TianJialong opened a new pull request, #13484:
URL: https://github.com/apache/gluten/pull/13484

   ### What changes are proposed in this pull request?
   
   Fixes #13480
   
   Maps the SHA-2 family hash expressions to their velox flinksql 
implementations (companion velox PR in bigo-sg/velox#95):
   
   - `RexCallConverterFactory`: `SHA2` / `SHA224` / `SHA256` / `SHA384` / 
`SHA512` entries — plain name mappings. The fixed-length spellings bind the 
hash length on the velox side (the sha2 core with the length bound), and the 
`hashLength` operand needs no converter-side handling: whatever integer width 
the planner hands down (INT or BIGINT, column ref or folded constant) resolves 
through the velox sha2 signature set, which registers every NUMERIC_INTEGER 
width.
   - `RexNodeConverterTest`: covers the five mappings — SHA2's two-operand call 
(VARCHAR input + INTEGER length) and the four one-operand spellings, asserting 
each velox function name, arity and the VarCharType return (the operators' 
CHAR(56/64/96/128) / VARCHAR(128) return types map to velox VarCharType, 
matching the registered signatures).
   - No `RexNodeConverter` change is required: the hash expressions read the 
input column directly, and any constant-input fold reduces to a VARCHAR 
literal, which the existing literal channel already handles — unlike the 
temporal family, no new typed-literal channels or cast elision are needed.
   
   ### How was this patch tested?
   
   - Planner-level: `RexNodeConverterTest` — the five name mappings with arity 
and return-type assertions (`testSha2FamilyCallsMapToVeloxNames`).
   - End-to-end on the GFV cluster (Flink 1.19.2 with the gluten-flink bridge, 
plans executing through the gluten-calc operator): 3 rows x 11 expressions — 
the four fixed-length spellings plus SHA2 at 224/256/384/512/0/BIGINT-256 — 
matched the standard SHA-2 digests exactly, including a multi-byte UTF-8 row; 
SHA2(s, 385) fails the job with the unsupported-length error mirroring Flink's 
rejection of unsupported algorithms; a REGEXP_EXTRACT regression case guards 
the existing flinksql baseline.
   


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