Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: convert sql expression into proto extended expressions #191
feat: convert sql expression into proto extended expressions #191
Changes from 10 commits
333989f
f4b6581
a79f57d
a37be92
9f6aaf3
52b41e3
74d13d3
3d80d1f
ae84176
5954a62
fc33a32
217f2a0
75e4f48
1d23187
5adc79f
940f703
e281f2f
f817eb0
b1c96bd
3d9b927
e790492
ef7c076
d1b4efb
c26fecd
bdde874
0fa69c8
92d2cc5
379b83f
e415785
c27dd37
a5d8126
50602f2
f57322a
1c8b8b5
c71bff1
183dcb6
3835a4f
6327a17
8658558
ecf3133
3ff586a
6151bca
96a2f25
579d2af
3b110f3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This is a great integration test, but I think it would be better if we moved it to the Arrow repo instead of adding Arrow as a dependency to Isthmus. What do you think?
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.
Ok, let me delete that part.
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.
Just deleted
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.
Does this handle multiple tables containing a field with the same name?
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.
I'll test this scenario
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.
This scenario is not supported. It will be updated with the last filed type declared. Calcite API is not offering an option to mark field per this table if it is duplicated.
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.
Does this handle multiple tables containing a field with the same name?
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.
I'll test this scenario
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.
This scenario is not supported. It will be updated with the last filed type declared. Calcite API is not offering an option to mark field per this table if it is duplicated.
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.
If Calcite can't handle this, then we should throw an exception if we try to build either of those maps with duplicate values. I think it's better to explode loudly than to have a last-write wins style validator.
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.
One thing to check, does it work with qualified paths? Like if you have:
and you put the fully qualified identifier
foo.a
as the map key, can the expressiona
find it?Then going further if you had
does Calcite reject the expression
a
as being ambiguous, but acceptfoo.a
?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.
I will add that validation and also test the last scenario you mentioned.
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.
Hi Team,
I am trying to implement this, but I am seeing limitations on the current Calcite implementation of SQL Expressions for qualified paths. There are two issues I would like to register:
SqlNode validSQLNode = validator.validateParameterizedExpression(sqlNode, nameToTypeMap);
converter.convertExpression(validSQLNode, nameToNodeMap);
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.
Just filled (1) https://issues.apache.org/jira/browse/CALCITE-6195.
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.
Thanks for looking into this! If qualified paths aren't supported Calcite, then I don't think we should concern ourselves with them here. I think we still need to deal with ambiguous lookups, probably by rejecting them if there is no mechanism to specify one or the other with a qualified path.
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.
Just added a logic to handle illegal argument for ambiguous lookups and also added unit test to validate that.