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
In this query behavior should be the same when resolving firstChar in stats, but in fields command, firstChar should come from NamedExpression because message no longer exists.
To solve this issue, initial implementation always prioritizes to use ParseExpression instead of NamedExpression if both exists. If the raw text field of parse expression is missing, then it will read from tuple values. This brings the restrictions of not able to rewrite parsed fields and etc. Related code:
Overview
There are few problems with the initial approach of
parse
command implementation from #411, it brings some limitations described in #359.One of the root cause is that PPL cannot determine whether to use
NamedExpression
orParseExpression
when resolving identifiers. For example:In this query when resolving
firstChar
, PPL should refer to ParseExpressionfirstChar
and derive it from fieldmessage
.In this query behavior should be the same when resolving
firstChar
in stats, but infields
command,firstChar
should come fromNamedExpression
becausemessage
no longer exists.To solve this issue, initial implementation always prioritizes to use
ParseExpression
instead ofNamedExpression
if both exists. If the raw text field of parse expression is missing, then it will read from tuple values. This brings the restrictions of not able to rewrite parsed fields and etc. Related code:sql/core/src/main/java/org/opensearch/sql/planner/physical/ProjectOperator.java
Lines 54 to 82 in 578c6b2
Ideas for a better implementation:
sql/opensearch/src/main/java/org/opensearch/sql/opensearch/storage/OpenSearchIndexScan.java
Lines 76 to 77 in fe20fb1
The text was updated successfully, but these errors were encountered: