You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/04/26 23:01:58 UTC

[GitHub] [pinot] walterddr opened a new issue, #8596: [Feature] Support LiteralContext to replace the default STRING literal

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: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org