Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ private void checkTopnOpt(PlanNode node) {
if (child instanceof OlapScanNode && sortNode.getLimit() > 0
&& sortNode.getSortInfo().getMaterializedOrderingExprs().size() > 0) {
Expr firstSortExpr = sortNode.getSortInfo().getMaterializedOrderingExprs().get(0);
if (firstSortExpr instanceof SlotRef && !firstSortExpr.getType().isStringType()) {
if (firstSortExpr instanceof SlotRef && !firstSortExpr.getType().isStringType()
&& !firstSortExpr.getType().isFloatingPointType()) {
OlapScanNode scanNode = (OlapScanNode) child;
sortNode.setUseTopnOpt(true);
scanNode.setUseTopnOpt(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !1 --
0. 0.1 0.
\N 20.268 20.268

Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ suite("test_split_part") {
"""
exception "[RUNTIME_ERROR]Argument at index 3 for function split_part must be constant"
}

qt_1 "select split_part(k8, '1', 1), k8, split_part(concat(k8, '12'), '1', 1) from test_query_db.test order by k8 limit 2;"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this regression test related with the issue? It does not have any pushdown predicates.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

topn generated a runtime predicate, a newly supported feature in pr #15558

}