You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we try to replace alias in ORDER BY, we only replace ordinal or alias directly. In our case, state is NOT NULL is an expression which causes alias replacement fail. Will debug to confirm and open issue/PR to fix. However, just to let you know, the fix would be only available in latest OpenSearch version (probably 2.3 next). Thanks!
I checked the code. It's easy to quick fix field IS (NOT) NULL in AstSortBuilder. However, to support general case for arbitrary expression, it requires cloning entire expression after the alias replacement.
@jingyali-apr Thanks for confirming! I may have found where things go wrong:
sql/sql/src/main/java/org/opensearch/sql/sql/parser/AstSortBuilder.java
Line 53 in 907019c
When we try to replace alias in
ORDER BY
, we only replace ordinal or alias directly. In our case,state is NOT NULL
is an expression which causes alias replacement fail. Will debug to confirm and open issue/PR to fix. However, just to let you know, the fix would be only available in latest OpenSearch version (probably 2.3 next). Thanks!Originally posted by @dai-chen in #292 (comment)
The text was updated successfully, but these errors were encountered: