Hello Zoltan Borok-Nagy, Csaba Ringhofer, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24504
to look at the new patch set (#3).
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
recognize and operate on UUID columns from external table formats that
store them natively. This commit establishes the foundational type
system support.
- Internally, UUID is stored as a fixed-length 16-byte value inline in
tuple slots, represented at execution time as a StringVal whose ptr/len
refer directly to that slot (similar to CHAR). Canonical string
formatting (8-4-4-4-12) is deferred until SQL and client boundaries
(e.g. CAST(uuid AS STRING), HS2 result serialization, and display), and
external metadata stores UUID as STRING where native UUID is unavailable
(HiveServer2 STRING_TYPE, HMS "string" column type) 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 in
those contexts. Explicit CAST from STRING/VARCHAR/CHAR to UUID, and
from UUID to STRING, is also supported.
Key additions:
- UUID keyword added to SQL parser and lexer
- TYPE_UUID added to FE and BE type systems with 16-byte inline storage
- StringVal-based execution representation with in-place MIN/MAX support
- 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/codegen/codegen-anyval-ir.cc
M be/src/codegen/codegen-anyval.cc
M be/src/codegen/gen_ir_descriptions.py
M be/src/codegen/llvm-codegen.cc
M be/src/exec/aggregator.cc
M be/src/exec/hash-table.cc
M be/src/exprs/agg-fn-evaluator.cc
M be/src/exprs/aggregate-functions-ir.cc
M be/src/exprs/aggregate-functions.h
M be/src/exprs/anyval-util.cc
M be/src/exprs/anyval-util.h
M be/src/exprs/literal.cc
M be/src/exprs/null-literal.cc
M be/src/exprs/operators-ir.cc
M be/src/exprs/operators.h
M be/src/exprs/scalar-expr-evaluator-ir.cc
M be/src/exprs/scalar-expr-evaluator.cc
M be/src/exprs/scalar-expr.inline.h
M be/src/exprs/scalar-fn-call.cc
M be/src/exprs/slot-ref.cc
M be/src/runtime/descriptors.cc
M be/src/runtime/raw-value-ir.cc
M be/src/runtime/raw-value.cc
M be/src/runtime/raw-value.inline.h
M be/src/runtime/types.cc
M be/src/runtime/types.h
M be/src/service/fe-support.cc
M be/src/service/hs2-util.cc
M be/src/service/query-result-set.cc
M be/src/udf/udf.h
M be/src/util/symbols-util.cc
A be/src/util/uuid-util.h
M common/thrift/Types.thrift
M fe/src/main/cup/sql-parser.cup
M fe/src/main/java/org/apache/impala/analysis/AlterTableAddColsStmt.java
M fe/src/main/java/org/apache/impala/analysis/CastExpr.java
M fe/src/main/java/org/apache/impala/analysis/ColumnDef.java
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/LikePredicate.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/AnalyzeExprsTest.java
M fe/src/test/java/org/apache/impala/analysis/ParserTest.java
M java/calcite-planner/src/test/java/org/apache/impala/CompatibilityTest.java
M tests/hs2/test_hs2.py
55 files changed, 564 insertions(+), 53 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/04/24504/3
--
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: newpatchset
Gerrit-Change-Id: Iefc73aefe73b6144c929ec37b0cb333007cf8bfe
Gerrit-Change-Number: 24504
Gerrit-PatchSet: 3
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>