Zoltan Borok-Nagy has uploaded this change for review. ( 
https://gerrit.cloudera.org/25459


Change subject: IMPALA-15811: Support DECIMAL(p,s) as a variant_get() target 
type
......................................................................

IMPALA-15811: Support DECIMAL(p,s) as a variant_get() target type

The typed form of variant_get(v, path, type) and try_variant_get()
rejected decimal types during analysis, so the STRING type was the
only exact way to read a VARIANT decimal.

The type argument can now be 'decimal(p,s)', 'decimal(p)' or
'decimal', with the defaults of the DECIMAL column type. The frontend
parses the precision and scale and sets them in the return type of the
new variant_get_decimal() and try_variant_get_decimal() builtins.

Decimal, integer, floating-point and string values convert like
CAST(... AS DECIMAL(p,s)) with DECIMAL_V2: digits beyond the scale
round half away from zero. A value that does not fit the precision is
an out-of-range error, or NULL for try_variant_get().

The docs now also cover the decimal conversions of IMPALA-15611.

Testing:
- Added BE, FE and EE tests for the decimal types.
- Built plain-html docs without errors.

Change-Id: I07a1aab68238b4af8760f647848aaf07cc5d497d
Assisted-by: Claude Fable 5.2 (Claude Code)
---
M be/src/exprs/variant-functions-ir.cc
M be/src/exprs/variant-functions-test.cc
M be/src/exprs/variant-functions.h
M common/function-registry/impala_functions.py
M docs/topics/impala_variant.xml
M fe/src/main/java/org/apache/impala/analysis/FunctionCallExpr.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java
M 
testdata/workloads/functional-query/queries/QueryTest/iceberg-v3-variant-get.test
8 files changed, 397 insertions(+), 26 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/59/25459/1
--
To view, visit https://gerrit.cloudera.org/25459
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I07a1aab68238b4af8760f647848aaf07cc5d497d
Gerrit-Change-Number: 25459
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>

Reply via email to