This is an automated email from the ASF dual-hosted git repository.

stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit a190eb0a5ed38b17f186a417cc22264161137d73
Author: Steve Carlin <[email protected]>
AuthorDate: Tue Feb 24 21:33:23 2026 -0800

    IMPALA-14429: (addendum) Only int types need extra conversion.
    
    A regression was caused with the IMPALA-14429 commit when a decimal
    was being compared with integers in an IN clause. Calcite only
    misclassifies integer types, so only those should be changed in
    the ImpalaRexBuilder when creating literals.
    
    Change-Id: Ic41e0141737c771b6d5ea48aa99144a919427207
    Reviewed-on: http://gerrit.cloudera.org:8080/24031
    Reviewed-by: Aman Sinha <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 .../impala/calcite/operators/ImpalaRexBuilder.java |  2 +-
 .../PlannerTest/calcite_tpcds/tpcds-q33.test       | 54 ++++++++--------
 .../calcite_tpcds/tpcds-q43-verbose.test           |  6 +-
 .../PlannerTest/calcite_tpcds/tpcds-q43.test       | 18 +++---
 .../PlannerTest/calcite_tpcds/tpcds-q56.test       | 54 ++++++++--------
 .../PlannerTest/calcite_tpcds/tpcds-q60.test       | 54 ++++++++--------
 .../PlannerTest/calcite_tpcds/tpcds-q61.test       | 72 +++++++++++-----------
 .../PlannerTest/calcite_tpcds/tpcds-q89.test       |  6 +-
 .../PlannerTest/calcite_tpcds/tpcds-q91.test       | 18 +++---
 .../queries/QueryTest/calcite.test                 |  6 ++
 10 files changed, 148 insertions(+), 142 deletions(-)

diff --git 
a/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaRexBuilder.java
 
b/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaRexBuilder.java
index 3c210135d..0c5eccc9e 100644
--- 
a/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaRexBuilder.java
+++ 
b/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaRexBuilder.java
@@ -67,7 +67,7 @@ public class ImpalaRexBuilder extends RexBuilder {
     // folding, if a '1 + 1' is folded to a '2', the '2' will be explicitly 
set to a
     // smallint rather than a tinyint because of the "+" operation.
     if (!postAnalysis_) {
-      if (SqlTypeUtil.isExactNumeric(type) && o instanceof BigDecimal) {
+      if (SqlTypeUtil.isIntType(type) && o instanceof BigDecimal) {
         BigDecimal bd0 = (BigDecimal) o;
         type = ImpalaTypeConverter.getLiteralDataType(bd0, type);
       }
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q33.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q33.test
index ede162a46..4d9463509 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q33.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q33.test
@@ -161,13 +161,13 @@ PLAN-ROOT SINK
 |  |
 |  |--25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -272,13 +272,13 @@ PLAN-ROOT SINK
 |  |
 |  |--15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -377,13 +377,13 @@ PLAN-ROOT SINK
 |
 |--05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
@@ -602,13 +602,13 @@ max-parallelism=60 segment-costs=[59409, 59409, 59409, 
8325, 5176] cpu-compariso
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -797,13 +797,13 @@ max-parallelism=60 segment-costs=[59409, 59409, 59409, 
8325, 5176] cpu-compariso
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -987,13 +987,13 @@ max-parallelism=60 segment-costs=[562543053, 207079] 
cpu-comparison-result=60 [m
 |  max-parallelism=10 segment-costs=[2675761]
 |  05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
@@ -1229,13 +1229,13 @@ max-parallelism=60 segment-costs=[59409, 59409, 59409, 
8325, 5176] cpu-compariso
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -1424,13 +1424,13 @@ max-parallelism=60 segment-costs=[59409, 59409, 59409, 
8325, 5176] cpu-compariso
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -1614,13 +1614,13 @@ max-parallelism=60 segment-costs=[562543053, 207079] 
cpu-comparison-result=60 [m
 |  max-parallelism=10 segment-costs=[2675761]
 |  05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43-verbose.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43-verbose.test
index 81bed0320..87c4fa632 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43-verbose.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43-verbose.test
@@ -148,13 +148,13 @@ SumCost: cost-total=673 max-instances=1 adj-instances=1 
cost/inst=673 #cons:#pro
   |  cost-total=54 max-instances=1 adj-instances=1 cost/inst=54 
#cons:#prod=336:336 reduction=1.0 cost/cons=0.16071428 cost/prod=0.16071428 
raw-cost=54.3753
   03:SCAN HDFS [tpcds_partitioned_parquet_snap.store, RANDOM]
      HDFS partitions=1/1 files=1 size=119.76KB
-     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 
AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 
AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
      stored statistics:
        table: rows=1.35K size=119.76KB
        columns: all
      extrapolated-rows=disabled max-scan-range-rows=1.35K
-     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(3,0))
-     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(5,2))
+     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
      file formats: [PARQUET]
      mem-estimate=16.00MB mem-reservation=32.00KB thread-reservation=0
      cost-total=619 max-instances=1 adj-instances=1 cost/inst=619 
#cons:#prod=1350:336 reduction=4.017857 cost/cons=0.4585185 cost/prod=1.8422619 
raw-cost=619.0092
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43.test
index f8122e60a..555f24548 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q43.test
@@ -51,13 +51,13 @@ PLAN-ROOT SINK
 |
 |--03:SCAN HDFS [tpcds_partitioned_parquet_snap.store]
 |     HDFS partitions=1/1 files=1 size=119.76KB
-|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 
AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 
AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     stored statistics:
 |       table: rows=1.35K size=119.76KB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     mem-estimate=16.00MB mem-reservation=32.00KB thread-reservation=0
 |     tuple-ids=4 row-size=52B cardinality=336 cost=619
 |     in pipelines: 03(GETNEXT)
@@ -173,13 +173,13 @@ max-parallelism=310 segment-costs=[3058023158, 1710341] 
cpu-comparison-result=12
 |  max-parallelism=1 segment-costs=[673]
 |  03:SCAN HDFS [tpcds_partitioned_parquet_snap.store, RANDOM]
 |     HDFS partitions=1/1 files=1 size=119.76KB
-|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 
AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 
AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     stored statistics:
 |       table: rows=1.35K size=119.76KB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     mem-estimate=16.00MB mem-reservation=32.00KB thread-reservation=0
 |     tuple-ids=4 row-size=52B cardinality=336 cost=619
 |     in pipelines: 03(GETNEXT)
@@ -312,13 +312,13 @@ max-parallelism=310 segment-costs=[3058023158, 1710341] 
cpu-comparison-result=12
 |  max-parallelism=1 segment-costs=[673]
 |  03:SCAN HDFS [tpcds_partitioned_parquet_snap.store, RANDOM]
 |     HDFS partitions=1/1 files=1 size=119.76KB
-|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 
AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 
AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     stored statistics:
 |       table: rows=1.35K size=119.76KB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-6 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     mem-estimate=16.00MB mem-reservation=32.00KB thread-reservation=0
 |     tuple-ids=4 row-size=52B cardinality=336 cost=619
 |     in pipelines: 03(GETNEXT)
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q56.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q56.test
index 65c861052..b7340e5ac 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q56.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q56.test
@@ -155,13 +155,13 @@ PLAN-ROOT SINK
 |  |
 |  |--25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -266,13 +266,13 @@ PLAN-ROOT SINK
 |  |
 |  |--15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -371,13 +371,13 @@ PLAN-ROOT SINK
 |
 |--05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
@@ -597,13 +597,13 @@ max-parallelism=60 segment-costs=[3009167, 1914295, 
1228691, 1614300, 1290683] c
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -793,13 +793,13 @@ max-parallelism=60 segment-costs=[3009167, 1914295, 
1228691, 1614300, 1290683] c
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -983,13 +983,13 @@ max-parallelism=60 segment-costs=[540745133, 13955253] 
cpu-comparison-result=60
 |  max-parallelism=10 segment-costs=[2675761]
 |  05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
@@ -1226,13 +1226,13 @@ max-parallelism=60 segment-costs=[3009167, 1914295, 
1228691, 1614300, 1290683] c
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -1422,13 +1422,13 @@ max-parallelism=60 segment-costs=[3009167, 1914295, 
1228691, 1614300, 1290683] c
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -1612,13 +1612,13 @@ max-parallelism=60 segment-costs=[540745133, 13955253] 
cpu-comparison-result=60
 |  max-parallelism=10 segment-costs=[2675761]
 |  05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q60.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q60.test
index 68bb86f24..694aab4cd 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q60.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q60.test
@@ -164,13 +164,13 @@ PLAN-ROOT SINK
 |  |
 |  |--25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -275,13 +275,13 @@ PLAN-ROOT SINK
 |  |
 |  |--15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -380,13 +380,13 @@ PLAN-ROOT SINK
 |
 |--05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
@@ -606,13 +606,13 @@ max-parallelism=60 segment-costs=[6819259, 4400373, 
2635532, 1614300, 1290683] c
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -802,13 +802,13 @@ max-parallelism=60 segment-costs=[6819259, 4400373, 
2635532, 1614300, 1290683] c
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -992,13 +992,13 @@ max-parallelism=60 segment-costs=[561638319, 35010096] 
cpu-comparison-result=60
 |  max-parallelism=10 segment-costs=[2675761]
 |  05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
@@ -1235,13 +1235,13 @@ max-parallelism=60 segment-costs=[6819259, 4400373, 
2635532, 1614300, 1290683] c
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  25:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_1.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_1.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=27 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 25(GETNEXT)
@@ -1431,13 +1431,13 @@ max-parallelism=60 segment-costs=[6819259, 4400373, 
2635532, 1614300, 1290683] c
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  15:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=15 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 15(GETNEXT)
@@ -1621,13 +1621,13 @@ max-parallelism=60 segment-costs=[561638319, 35010096] 
cpu-comparison-result=60
 |  max-parallelism=10 segment-costs=[2675761]
 |  05:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |     HDFS partitions=1/1 files=1 size=307.36MB
-|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     stored statistics:
 |       table: rows=15.00M size=307.36MB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-5 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |     tuple-ids=4 row-size=8B cardinality=2.43M cost=2571000
 |     in pipelines: 05(GETNEXT)
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q61.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q61.test
index 38dd18efa..ad56f5ff0 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q61.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q61.test
@@ -88,13 +88,13 @@ PLAN-ROOT SINK
 |  |  |
 |  |  |--22:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |  |     stored statistics:
 |  |  |       table: rows=15.00M size=307.36MB
 |  |  |       columns: all
 |  |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0))
-|  |  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2))
+|  |  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |  |     tuple-ids=25 row-size=8B cardinality=2.43M cost=2571000
 |  |  |     in pipelines: 22(GETNEXT)
@@ -122,13 +122,13 @@ PLAN-ROOT SINK
 |  |
 |  |--19:SCAN HDFS [tpcds_partitioned_parquet_snap.store]
 |  |     HDFS partitions=1/1 files=1 size=119.76KB
-|  |     predicates: tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = 
CAST(-7 AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store_0.s_store_sk IS 
NOT NULL
+|  |     predicates: tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = 
CAST(-7 AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store_0.s_store_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=1.35K size=119.76KB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store_0.s_store_sk IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store_0.s_store_sk IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=0
 |  |     tuple-ids=21 row-size=8B cardinality=336 cost=231
 |  |     in pipelines: 19(GETNEXT)
@@ -214,13 +214,13 @@ PLAN-ROOT SINK
 |  |
 |  |--10:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=12 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 10(GETNEXT)
@@ -248,13 +248,13 @@ PLAN-ROOT SINK
 |
 |--07:SCAN HDFS [tpcds_partitioned_parquet_snap.store]
 |     HDFS partitions=1/1 files=1 size=119.76KB
-|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 
AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 
AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     stored statistics:
 |       table: rows=1.35K size=119.76KB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=0
 |     tuple-ids=8 row-size=8B cardinality=336 cost=231
 |     in pipelines: 07(GETNEXT)
@@ -444,13 +444,13 @@ PLAN-ROOT SINK
 |  |  |  max-parallelism=10 segment-costs=[5069764]
 |  |  |  22:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |  |     stored statistics:
 |  |  |       table: rows=15.00M size=307.36MB
 |  |  |       columns: all
 |  |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0))
-|  |  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2))
+|  |  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |  |     tuple-ids=25 row-size=8B cardinality=2.43M cost=2571000
 |  |  |     in pipelines: 22(GETNEXT)
@@ -513,13 +513,13 @@ PLAN-ROOT SINK
 |  |  max-parallelism=1 segment-costs=[245]
 |  |  19:SCAN HDFS [tpcds_partitioned_parquet_snap.store, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=119.76KB
-|  |     predicates: tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = 
CAST(-7 AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store_0.s_store_sk IS 
NOT NULL
+|  |     predicates: tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = 
CAST(-7 AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store_0.s_store_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=1.35K size=119.76KB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store_0.s_store_sk IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store_0.s_store_sk IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=0
 |  |     tuple-ids=21 row-size=8B cardinality=336 cost=231
 |  |     in pipelines: 19(GETNEXT)
@@ -688,13 +688,13 @@ max-parallelism=60 segment-costs=[585345192, 185] 
cpu-comparison-result=77 [max(
 |  |  max-parallelism=10 segment-costs=[5069764]
 |  |  10:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=12 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 10(GETNEXT)
@@ -748,13 +748,13 @@ max-parallelism=60 segment-costs=[585345192, 185] 
cpu-comparison-result=77 [max(
 |  max-parallelism=1 segment-costs=[245]
 |  07:SCAN HDFS [tpcds_partitioned_parquet_snap.store, RANDOM]
 |     HDFS partitions=1/1 files=1 size=119.76KB
-|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 
AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 
AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     stored statistics:
 |       table: rows=1.35K size=119.76KB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=0
 |     tuple-ids=8 row-size=8B cardinality=336 cost=231
 |     in pipelines: 07(GETNEXT)
@@ -995,13 +995,13 @@ PLAN-ROOT SINK
 |  |  |  max-parallelism=10 segment-costs=[5069764]
 |  |  |  22:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |  |     stored statistics:
 |  |  |       table: rows=15.00M size=307.36MB
 |  |  |       columns: all
 |  |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0))
-|  |  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
+|  |  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2))
+|  |  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address_0.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address_0.ca_address_sk 
IS NOT NULL
 |  |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |  |     tuple-ids=25 row-size=8B cardinality=2.43M cost=2571000
 |  |  |     in pipelines: 22(GETNEXT)
@@ -1064,13 +1064,13 @@ PLAN-ROOT SINK
 |  |  max-parallelism=1 segment-costs=[245]
 |  |  19:SCAN HDFS [tpcds_partitioned_parquet_snap.store, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=119.76KB
-|  |     predicates: tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = 
CAST(-7 AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store_0.s_store_sk IS 
NOT NULL
+|  |     predicates: tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = 
CAST(-7 AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store_0.s_store_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=1.35K size=119.76KB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store_0.s_store_sk IS NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store_0.s_gmt_offset = CAST(-7 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store_0.s_store_sk IS NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=0
 |  |     tuple-ids=21 row-size=8B cardinality=336 cost=231
 |  |     in pipelines: 19(GETNEXT)
@@ -1238,13 +1238,13 @@ max-parallelism=10 segment-costs=[23802542, 185] 
cpu-comparison-result=90 [max(9
 |  |  max-parallelism=10 segment-costs=[5069764]
 |  |  10:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-7 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=12 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 10(GETNEXT)
@@ -1307,13 +1307,13 @@ max-parallelism=80 segment-costs=[794436452]
 |  max-parallelism=1 segment-costs=[245]
 |  07:SCAN HDFS [tpcds_partitioned_parquet_snap.store, RANDOM]
 |     HDFS partitions=1/1 files=1 size=119.76KB
-|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 
AS DECIMAL(3,0)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     predicates: tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 
AS DECIMAL(5,2)), tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     stored statistics:
 |       table: rows=1.35K size=119.76KB
 |       columns: all
 |     extrapolated-rows=disabled max-scan-range-rows=1.35K
-|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(3,0))
-|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(3,0)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
+|     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(5,2))
+|     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.store.s_gmt_offset = CAST(-7 AS DECIMAL(5,2)), 
tpcds_partitioned_parquet_snap.store.s_store_sk IS NOT NULL
 |     mem-estimate=16.00MB mem-reservation=16.00KB thread-reservation=0
 |     tuple-ids=8 row-size=8B cardinality=336 cost=231
 |     in pipelines: 07(GETNEXT)
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q89.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q89.test
index ce8c4fee0..f6ea6cc0a 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q89.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q89.test
@@ -44,7 +44,7 @@ PLAN-ROOT SINK
 |  in pipelines: 11(GETNEXT), 08(OPEN)
 |
 10:SELECT
-|  predicates: CASE WHEN 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)) != CAST(0 
AS DECIMAL(3,0)) THEN 
divide(abs(subtract(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price),
 avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)))), 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price))) ELSE NULL 
END > CAST(0.1 AS DECIMAL(2,1))
+|  predicates: CASE WHEN 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)) != CAST(0 
AS DECIMAL(38,6)) THEN 
divide(abs(subtract(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price),
 avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)))), 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price))) ELSE NULL 
END > CAST(0.1 AS DECIMAL(2,1))
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  tuple-ids=13,12 row-size=137B cardinality=298.51K cost=2985120
 |  in pipelines: 08(GETNEXT)
@@ -173,7 +173,7 @@ max-parallelism=10 segment-costs=[18890602, 9031203, 389] 
cpu-comparison-result=
 |  in pipelines: 11(GETNEXT), 08(OPEN)
 |
 10:SELECT
-|  predicates: CASE WHEN 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)) != CAST(0 
AS DECIMAL(3,0)) THEN 
divide(abs(subtract(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price),
 avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)))), 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price))) ELSE NULL 
END > CAST(0.1 AS DECIMAL(2,1))
+|  predicates: CASE WHEN 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)) != CAST(0 
AS DECIMAL(38,6)) THEN 
divide(abs(subtract(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price),
 avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)))), 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price))) ELSE NULL 
END > CAST(0.1 AS DECIMAL(2,1))
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  tuple-ids=13,12 row-size=137B cardinality=298.51K cost=2985120
 |  in pipelines: 08(GETNEXT)
@@ -377,7 +377,7 @@ max-parallelism=10 segment-costs=[18890602, 9031203, 389] 
cpu-comparison-result=
 |  in pipelines: 11(GETNEXT), 08(OPEN)
 |
 10:SELECT
-|  predicates: CASE WHEN 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)) != CAST(0 
AS DECIMAL(3,0)) THEN 
divide(abs(subtract(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price),
 avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)))), 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price))) ELSE NULL 
END > CAST(0.1 AS DECIMAL(2,1))
+|  predicates: CASE WHEN 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)) != CAST(0 
AS DECIMAL(38,6)) THEN 
divide(abs(subtract(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price),
 avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price)))), 
avg(sum(tpcds_partitioned_parquet_snap.store_sales.ss_sales_price))) ELSE NULL 
END > CAST(0.1 AS DECIMAL(2,1))
 |  mem-estimate=0B mem-reservation=0B thread-reservation=0
 |  tuple-ids=13,12 row-size=137B cardinality=298.51K cost=2985120
 |  in pipelines: 08(GETNEXT)
diff --git 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q91.test
 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q91.test
index 06c2d6740..9c8389457 100644
--- 
a/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q91.test
+++ 
b/testdata/workloads/functional-planner/queries/PlannerTest/calcite_tpcds/tpcds-q91.test
@@ -112,13 +112,13 @@ PLAN-ROOT SINK
 |  |
 |  |--06:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=8 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 06(GETNEXT)
@@ -375,13 +375,13 @@ max-parallelism=10 segment-costs=[15015105, 146771] 
cpu-comparison-result=73 [ma
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  06:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=8 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 06(GETNEXT)
@@ -672,13 +672,13 @@ max-parallelism=10 segment-costs=[15015105, 146771] 
cpu-comparison-result=73 [ma
 |  |  max-parallelism=10 segment-costs=[2675761]
 |  |  06:SCAN HDFS [tpcds_partitioned_parquet_snap.customer_address, RANDOM]
 |  |     HDFS partitions=1/1 files=1 size=307.36MB
-|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     stored statistics:
 |  |       table: rows=15.00M size=307.36MB
 |  |       columns: all
 |  |     extrapolated-rows=disabled max-scan-range-rows=1.58M
-|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0))
-|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(3,0)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
+|  |     parquet statistics predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2))
+|  |     parquet dictionary predicates: 
tpcds_partitioned_parquet_snap.customer_address.ca_gmt_offset = CAST(-6 AS 
DECIMAL(5,2)), tpcds_partitioned_parquet_snap.customer_address.ca_address_sk IS 
NOT NULL
 |  |     mem-estimate=16.00MB mem-reservation=128.00KB thread-reservation=0
 |  |     tuple-ids=8 row-size=8B cardinality=2.43M cost=2571000
 |  |     in pipelines: 06(GETNEXT)
diff --git a/testdata/workloads/functional-query/queries/QueryTest/calcite.test 
b/testdata/workloads/functional-query/queries/QueryTest/calcite.test
index ce34c1839..c3f9adf14 100644
--- a/testdata/workloads/functional-query/queries/QueryTest/calcite.test
+++ b/testdata/workloads/functional-query/queries/QueryTest/calcite.test
@@ -1233,3 +1233,9 @@ WHERE 1 NOT IN
 (SELECT CASE WHEN id = 1 then null ELSE id END FROM functional.alltypestiny);
 ---- RESULTS
 ====
+---- QUERY
+# IMPALA-14429: Ensure correct type is used when decimal and ints are in an IN 
clause.
+select count(*) from tpch.lineitem where l_quantity in (1, 2)
+---- RESULTS
+239861
+====

Reply via email to