[Opt](exec) enable top opt in string type (#31489)
enable top opt in string type
This commit is contained in:
@ -127,8 +127,7 @@ public class TopNScanOpt extends PlanPostProcessor {
|
||||
if (!firstKey.isColumnFromTable()) {
|
||||
return topN;
|
||||
}
|
||||
if (firstKey.getDataType().isStringLikeType()
|
||||
|| firstKey.getDataType().isFloatType()
|
||||
if (firstKey.getDataType().isFloatType()
|
||||
|| firstKey.getDataType().isDoubleType()) {
|
||||
return topN;
|
||||
}
|
||||
|
||||
@ -543,8 +543,7 @@ public class OriginalPlanner extends Planner {
|
||||
&& sortNode.getLimit() <= ConnectContext.get().getSessionVariable().topnOptLimitThreshold
|
||||
&& sortNode.getSortInfo().getOrigOrderingExprs().size() > 0) {
|
||||
Expr firstSortExpr = sortNode.getSortInfo().getOrigOrderingExprs().get(0);
|
||||
if (firstSortExpr instanceof SlotRef && !firstSortExpr.getType().isStringType()
|
||||
&& !firstSortExpr.getType().isFloatingPointType()) {
|
||||
if (firstSortExpr instanceof SlotRef && !firstSortExpr.getType().isFloatingPointType()) {
|
||||
OlapScanNode scanNode = (OlapScanNode) child;
|
||||
if (scanNode.isDupKeysOrMergeOnWrite()) {
|
||||
sortNode.setUseTopnOpt(true);
|
||||
|
||||
Reference in New Issue
Block a user