File tree Expand file tree Collapse file tree
opensearch/src/main/java/org/opensearch/sql/opensearch/planner/rules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,10 +87,16 @@ protected void apply(
8787 .map (r -> ((RexInputRef ) r ).getIndex ())
8888 .map (i -> projectWithWindow .getInput ().getRowType ().getFieldNames ().get (i ))
8989 .toList ();
90- if (projectWithExpr != null && projectWithWindow .getProjects ().stream ()
91- .filter (rex -> !rex .isA (SqlKind .ROW_NUMBER ))
92- .filter (Predicate .not (dedupColumns ::contains ))
93- .anyMatch (rex -> !projectWithExpr .getProjects ().get (((RexInputRef ) rex ).getIndex ()).isA (SqlKind .INPUT_REF ))) {
90+ if (projectWithExpr != null
91+ && projectWithWindow .getProjects ().stream ()
92+ .filter (rex -> !rex .isA (SqlKind .ROW_NUMBER ))
93+ .filter (Predicate .not (dedupColumns ::contains ))
94+ .anyMatch (
95+ rex ->
96+ !projectWithExpr
97+ .getProjects ()
98+ .get (((RexInputRef ) rex ).getIndex ())
99+ .isA (SqlKind .INPUT_REF ))) {
94100 // TODO fallback to the approach of Collapse search
95101 // | eval new_age = age + 1 | fields gender, new_age | dedup 1 gender
96102 if (LOG .isDebugEnabled ()) {
You can’t perform that action at this time.
0 commit comments