ggjh-159 opened a new pull request, #12666:
URL: https://github.com/apache/gluten/pull/12666

   issue: #12665 
   
   ## What changes are proposed in this pull request?
   
   Adds Substrait conversion and unit tests for a batch of stateless scalar 
expressions in the gluten-flink planner, so common Flink SQL 
string/time/control scalar functions can run on the velox backend.
   
   ### Planner
   
   - `RexNodeConverter.java`: handles TIMESTAMP literal conversion to 
`TimestampValue.create(epochSeconds, nanos)`.
   - `RexCallConverterFactory.java`: adds new mappings:
     - Time fields: `YEAR` / `MONTH` / `DAYOFMONTH` / `DAYOFYEAR` / `DAYOFWEEK` 
/ `QUARTER` / `HOUR` / `MINUTE` / `SECOND` / `WEEK`.
     - String/control: `SUBSTRING` / `COALESCE` / `FROM_BASE64` / `JSON_VALUE` 
(mapped to the velox `get_json_object`).
   
   
   ## How was this patch tested?
   
   - `ScalarFunctionsTest.java`: new test cases covering the mappings above:
     - `testQuarterAndWeekFromTimestamp` (QUARTER + WEEK)
     - `testHourFromTimestamp` (HOUR)
     - `testMinuteSecondFromTimestamp` (MINUTE + SECOND)
     - `testDayFieldsFromTimestamp` (DAYOFMONTH + DAYOFWEEK + DAYOFYEAR, 
including the Sunday boundary)
     - `testSubstring` / `testCoalesce` / `testFromBase64` / `testJsonValue`
   
   


-- 
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]

Reply via email to