Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -592,4 +592,9 @@ public void setNotFold(boolean notFold) {
public boolean isNotFold() {
return this.notFold;
}

@Override
protected void compactForLiteral(Type type) {
// do nothing
}
}
11 changes: 11 additions & 0 deletions regression-test/suites/correctness_p0/test_cast_decimal.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,15 @@ suite("test_cast_decimal") {
sql """select cast(32123.34212456734 as decimal(3,2));"""
contains "CAST(32123.34212456734 AS DECIMALV3(3, 2))"
}

sql """drop table if exists test_ttt"""
sql """create table test_ttt(big_key bigint)DISTRIBUTED BY HASH(big_key) BUCKETS 1 PROPERTIES ("replication_num" = "1");"""
sql """set enable_nereids_planner=false;"""
sql """set enable_fold_constant_by_be = false; """
sql """SELECT 1
FROM test_ttt e1
HAVING truncate(100, 2) < -2308.57
AND cast(round(round(465.56, min(-5.987)), 2) AS DECIMAL) in
(SELECT cast(truncate(round(8990.65 - 4556.2354, 2.4652), 2)AS DECIMAL)
FROM test_ttt r2);"""
}