File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
exec/java-exec/src/main/java/org/apache/drill/exec/planner Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 3737import org .apache .calcite .rex .RexBuilder ;
3838import org .apache .calcite .rex .RexLiteral ;
3939import org .apache .calcite .rex .RexNode ;
40+ import org .apache .calcite .rex .RexWindowExclusion ;
4041import org .apache .calcite .sql .SqlAggFunction ;
4142import org .apache .calcite .sql .SqlKind ;
4243import org .apache .calcite .sql .SqlOperator ;
@@ -820,6 +821,7 @@ public void onMatch(RelOptRuleCall call) {
820821 group .isRows ,
821822 group .lowerBound ,
822823 group .upperBound ,
824+ RexWindowExclusion .EXCLUDE_NO_OTHER , // Default: no exclusion (Calcite 1.38+)
823825 group .orderKeys ,
824826 aggCalls );
825827 builder .add (newGroup );
Original file line number Diff line number Diff line change 4141import org .apache .calcite .rel .type .RelRecordType ;
4242import org .apache .calcite .rex .RexInputRef ;
4343import org .apache .calcite .rex .RexNode ;
44+ import org .apache .calcite .rex .RexWindowExclusion ;
4445import org .apache .calcite .sql .SqlAggFunction ;
4546
4647import java .util .List ;
@@ -168,6 +169,7 @@ public boolean apply(RelDataTypeField relDataTypeField) {
168169 windowBase .isRows ,
169170 windowBase .lowerBound ,
170171 windowBase .upperBound ,
172+ RexWindowExclusion .EXCLUDE_NO_OTHER , // Default: no exclusion (Calcite 1.38+)
171173 windowBase .orderKeys ,
172174 newWinAggCalls
173175 );
Original file line number Diff line number Diff line change @@ -43,13 +43,19 @@ public int getDefaultPrecision(SqlTypeName typeName) {
4343 }
4444
4545 @ Override
46- public int getMaxNumericScale () {
47- return 38 ;
46+ public int getMaxScale (SqlTypeName typeName ) {
47+ if (typeName == SqlTypeName .DECIMAL ) {
48+ return 38 ;
49+ }
50+ return super .getMaxScale (typeName );
4851 }
4952
5053 @ Override
51- public int getMaxNumericPrecision () {
52- return 38 ;
54+ public int getMaxPrecision (SqlTypeName typeName ) {
55+ if (typeName == SqlTypeName .DECIMAL ) {
56+ return 38 ;
57+ }
58+ return super .getMaxPrecision (typeName );
5359 }
5460
5561 @ Override
Original file line number Diff line number Diff line change 5757 <bouncycastle .version>1.78.1</bouncycastle .version>
5858 <caffeine .version>2.9.3</caffeine .version>
5959 <calcite .groupId>org.apache.calcite</calcite .groupId>
60- <calcite .version>1.37 .0</calcite .version>
60+ <calcite .version>1.38 .0</calcite .version>
6161 <codemodel .version>2.6</codemodel .version>
6262 <commons .beanutils.version>1.11.0</commons .beanutils.version>
6363 <commons .cli.version>1.4</commons .cli.version>
You can’t perform that action at this time.
0 commit comments