Arnab Karmakar has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24504


Change subject: IMPALA-15101: Add UUID primitive type to Impala
......................................................................

IMPALA-15101: Add UUID primitive type to Impala

- This patch introduces UUID as a new primitive type in Impala's type
  system. UUID is a 128-bit universally unique identifier commonly used
  in modern data systems like Iceberg tables. The type enables Impala to
  read UUID columns from external table formats that store them natively.
  This commit establishes the foundational type system support.

- The UUID type is implemented as a fixed-length 16-byte value internally,
  represented as a 36-character canonical string (8-4-4-4-12 format) at
  the SQL layer. For interoperability with systems that do not have a
  native UUID type, Impala maps UUID to string at external boundaries.
  HiveServer2 result metadata uses STRING_TYPE, and HMS column type
  is stored as "string" for UUID columns while Impala retains the native
  UUID type from Iceberg schema metadata.

- UUID is implicitly promoted to STRING for comparisons, IN/LIKE
  predicates, and string literals so explicit casts are not required.

Key additions:
- UUID keyword added to SQL parser and lexer
- UUID primitive type added to FE and BE type systems
- HS2 STRING_TYPE mapping and HMS "string" column type compatibility
- UuidCompatibility rules for implicit UUID/STRING promotion
- Analysis and parser infrastructure for UUID columns in DDL/DML

Testing:
- Added ParserTest coverage for UUID type in CREATE TABLE, CAST, and
  complex types (ARRAY, MAP, STRUCT)
- Added AnalyzeDDLTest coverage for UUID columns in CREATE TABLE statements

Change-Id: Iefc73aefe73b6144c929ec37b0cb333007cf8bfe
Assisted-by: Composer 2.5
---
M be/src/runtime/types.cc
M be/src/runtime/types.h
M be/src/service/hs2-util.cc
M be/src/service/query-result-set.cc
M common/thrift/Types.thrift
M fe/src/main/cup/sql-parser.cup
M fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/InPredicate.java
M fe/src/main/java/org/apache/impala/analysis/LiteralExpr.java
M fe/src/main/java/org/apache/impala/catalog/Column.java
M fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java
M fe/src/main/java/org/apache/impala/catalog/Function.java
M fe/src/main/java/org/apache/impala/catalog/PrimitiveType.java
M fe/src/main/java/org/apache/impala/catalog/ScalarFunction.java
M fe/src/main/java/org/apache/impala/catalog/ScalarType.java
M fe/src/main/java/org/apache/impala/catalog/Type.java
A fe/src/main/java/org/apache/impala/catalog/UuidCompatibility.java
M fe/src/main/jflex/sql-scanner.flex
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
M fe/src/test/java/org/apache/impala/analysis/ParserTest.java
20 files changed, 196 insertions(+), 15 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/04/24504/1
--
To view, visit http://gerrit.cloudera.org:8080/24504
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefc73aefe73b6144c929ec37b0cb333007cf8bfe
Gerrit-Change-Number: 24504
Gerrit-PatchSet: 1
Gerrit-Owner: Arnab Karmakar <[email protected]>

Reply via email to