amrishlal commented on PR #8535:
URL: https://github.com/apache/pinot/pull/8535#issuecomment-1098607748
Some thoughts:
1) one option may be to drop the cast function if it is casting something to
a numeric type. For example `intColumn > cast(10.3 as long)` could just be
rewritten to` intColumn > 10.3` and things would still work fine.
2) we should probably throw a syntax error if user tries to do something
like `intColumn > '12.3'` or `intColumn > cast('10.3' as INT)` (casting a
string literal to an int value) and that will encourage the user to write query
with proper literal values.
3) A cast function is probably more useful during run time if for example
the user wants to force cast string column values into numerical values (for
example `WHERE CAST(stringColumn AS INTEGER) > intColumn`. Otherwise, as far as
compile time literals are concerned, it seems like just replacing the CAST
function with literal would work? If the literal type is not compatible, then
an exception will be thrown which will encourage user to fix the literal in the
query?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]