abhioncbr opened a new pull request, #10790:
URL: https://github.com/apache/pinot/pull/10790

   - Added support for `json` scalar function(`JSONEXTRACTKEY` , 
`jsonextractscalar`)
   - Changes handle the String `split` function as well.
   
   **Solution approach**
   -  
[toSql](https://github.com/apache/pinot/blob/master/pinot-query-planner/src/main/java/org/apache/calcite/prepare/PinotCalciteCatalogReader.java#L420)
 function in class `PinotCalciteCatalogReader` sets columns data type as 
`SqlTypeName.ANY` if any scalar function return Object class.
   - 
[convertToColumnDataType](https://github.com/apache/pinot/blob/master/pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/RelToPlanNodeConverter.java#L299)
 function in class `RelToPlanNodeConverter` sets the ColumnDataType as 
`DataSchema.ColumnDataType.BYTES` because we aren't handling BYTES there.
   - Eventually, all such queries based on`DataSchema.ColumnDataType.BYTES` 
fails with a ClassCastException During the serialization step. However, we get 
the correct Data Type for the column from SelectionResultsBlock. We can use 
this right type to propagate the result. Added `handleBytesDataType` function 
tries to do the same. 
   
   cc: @walterddr 


-- 
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-unsubscr...@pinot.apache.org

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


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

Reply via email to