-
Notifications
You must be signed in to change notification settings - Fork 177
Support access to nested field of struct after fields command #4719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Heng Qian <[email protected]>
| // TODO: should use RelRecordType instead of MapSqlType here | ||
| // https://github.com/opensearch-project/sql/issues/3459 | ||
| final RelDataType relKey = TYPE_FACTORY.createSqlType(SqlTypeName.VARCHAR); | ||
| // TODO: should we provide more precise type here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: Do you have any idea how to specify precise type here? Calcite 1.41.0 has more strict type checking in RexToLixTranslator. If the Map value is another Array type, it cannot cast a ANY to Array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can do type-conversion recursively for the nested fields and store them in a customized type? It will has benefit to resolve proper functions for these fields.
What's more I'm thinking we may be able to deprecate the flatten fields if these nested fields' type are precise enough. It's not worthy to do that now since we have flatten fields and it only takes effect after FIELD command. It should be done as another issue for enhancement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Heng Qian <[email protected]> (cherry picked from commit e06ebc5) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…#4727) (cherry picked from commit e06ebc5) Signed-off-by: Heng Qian <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Heng Qian <[email protected]>
…arch-project#4719) Signed-off-by: Heng Qian <[email protected]>
Description
Support access to nested field of struct after fields command
Related Issues
Resolves #3459
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.