walterddr opened a new issue, #8596: URL: https://github.com/apache/pinot/issues/8596
Currently Pinot uses STRING type to store literal [in ExpressionContext](https://github.com/apache/pinot/blob/89836a57c0d2346e4a04d43c8a9d8ef1e7900b18/pinot-common/src/main/java/org/apache/pinot/common/request/context/ExpressionContext.java) This was creating some confusion in resolving SQL queries for example: `array_remove_string(mvStringCol, 2)` actually removes the literal string `"2"` from the myStringCol because 1. auto type conversion from int value to STRING in ExpressionContext, then 2. implicit type cast to INT, then 3. eventually cast to STRING to match the `arrayRemoveString` signature of `args(String[], String)` Propose to create a `LiteralContext` similar to the FunctionContext and FilterContext. it holds - `LiteralType` extracted from the [Thrift Literal](https://github.com/apache/pinot/blob/89836a57c0d2346e4a04d43c8a9d8ef1e7900b18/pinot-common/src/thrift/query.thrift#L59-L68) - `LiteralValue` which is the optional literal value CC @Jackie-Jiang @xiangfu0 ^ -- 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]
