ggjh-159 opened a new issue, #12665:
URL: https://github.com/apache/gluten/issues/12665

   ### Description
   
   ## Motivation
   
   The velox backend already implements a set of common Flink SQL scalar 
functions, but the gluten-flink planner has no mapping from Flink function name 
to velox Substrait operator, so these functions cannot be offloaded to velox 
today.
   
   Functions in scope:
   
   - Time fields: `YEAR`, `MONTH`, `DAYOFMONTH`, `DAYOFYEAR`, `DAYOFWEEK`, 
`QUARTER`, `HOUR`, `MINUTE`, `SECOND`, `WEEK`
   - String/control: `SUBSTRING`, `COALESCE`, `FROM_BASE64`, `JSON_VALUE`
   
   Additionally, `RexNodeConverter` does not convert TIMESTAMP literals to 
`TimestampValue.create(epochSeconds, nanos)`, so any literal-TIMESTAMP-bearing 
expression fails earlier in the conversion path.
   
   ## Proposed Capability
   
   The planner should produce a valid Substrait plan for SQL like:
   
   ```sql
   SELECT
     EXTRACT(HOUR FROM ts),
     SUBSTRING(name, 1, 3),
     COALESCE(name, 'unknown'),
     JSON_VALUE(payload, '$.user.id')
   FROM ...
   ```
   
   `JSON_VALUE` should map to the velox `get_json_object` operator; the others 
should map to their velox4j counterparts.
   
   ### Gluten version
   
   main branch


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