[ 
https://issues.apache.org/jira/browse/IMPALA-15202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116252#comment-18116252
 ] 

ASF subversion and git services commented on IMPALA-15202:
----------------------------------------------------------

Commit 4ec7bebb59c8cea5c0b706bf2f3b639dad03af63 in impala's branch 
refs/heads/master from Arnab Karmakar
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=4ec7bebb5 ]

IMPALA-15202: Add explicit CAST support between UUID and STRING

Add explicit CAST(expr AS UUID) and CAST(expr AS STRING) for Iceberg
UUID columns. Implicit casts between UUID and other types remain blocked
via UuidCompatibility. Users must write explicit casts to compare UUID
columns with string literals or to use string functions.

Key changes:
- Add CastToUuid to parse canonical 36-char strings into 16-byte UUID
  values with runtime validation and error reporting
- Add CastUuidToString to format UUID bytes as canonical lowercase
  strings
- Register explicit STRING/VARCHAR/CHAR -> UUID and UUID -> STRING cast
  builtins in CastExpr.initBuiltins()
- Support UUID results from constant expression evaluation in
  LiteralExpr.createBounded()

Testing:
- Extend iceberg uuid test suite with explicit CAST coverage alongside
  existing scalar-subquery predicate tests
- Add positive tests for UUID <-> STRING casts, UUID -> CHAR(36),
  CHAR(36)/VARCHAR(36) -> UUID, CAST(NULL AS UUID), and string functions
  via explicit UUID -> STRING cast
- Add negative tests for invalid UUID strings, unsupported cast targets
  (including UUID -> VARCHAR(36)), and write-path INSERT/CTAS with
  explicit casts

Change-Id: I51af55c6e343f7155cae22bf3714e293f31561d5
Assisted-by: Composer 2.5 (Cursor)
Reviewed-on: http://gerrit.cloudera.org:8080/24817
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Add UUID cast functions and client formatting
> ---------------------------------------------
>
>                 Key: IMPALA-15202
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15202
>             Project: IMPALA
>          Issue Type: Sub-task
>            Reporter: Arnab Karmakar
>            Assignee: Arnab Karmakar
>            Priority: Major
>
> Support explicit {{CAST}} to/from UUID and canonical string display in 
> HS2/query results.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to