[enhancement](regression-test) upgrade groovy to 4.x and enable run test by jdk17/21 (#31906)

upgrade groovy to 4.x and enable run test by jdk17 / 21
This commit is contained in:
924060929
2024-03-08 18:16:46 +08:00
committed by yiguolei
parent 5f9eb5eb52
commit cc0e58faec
7 changed files with 49 additions and 67 deletions

View File

@ -648,6 +648,9 @@ public class DateLiteral extends LiteralExpr {
int typeDiff = typeAsInt - thatTypeAsInt;
if (typeDiff != 0) {
return typeDiff;
} else if (typeAsInt == 0) {
// if all is date and equals date, then return
return 0;
}
long hourMinuteSecond = hour * 10000 + minute * 100 + second;

View File

@ -103,12 +103,12 @@ public class OneRangePartitionEvaluator
PartitionRangeExpander expander = new PartitionRangeExpander();
this.partitionSlotTypes = expander.computePartitionSlotTypes(lowers, uppers);
this.slotToType = Maps.newHashMapWithExpectedSize(partitionSlots.size() * 2);
this.slotToType = Maps.newHashMapWithExpectedSize(16);
for (int i = 0; i < partitionSlots.size(); i++) {
slotToType.put(partitionSlots.get(i), partitionSlotTypes.get(i));
}
this.partitionSlotContainsNull = Maps.newHashMapWithExpectedSize(partitionSlots.size() * 2);
this.partitionSlotContainsNull = Maps.newHashMapWithExpectedSize(16);
for (int i = 0; i < partitionSlots.size(); i++) {
Slot slot = partitionSlots.get(i);
if (!slot.nullable()) {
@ -612,7 +612,7 @@ public class OneRangePartitionEvaluator
Map<Slot, PartitionSlotInput> inputs) {
Builder<Slot, ColumnRange> allColumnRangesBuilder =
ImmutableMap.builderWithExpectedSize(inputs.size() * 2);
ImmutableMap.builderWithExpectedSize(16);
for (Entry<Slot, PartitionSlotInput> entry : inputs.entrySet()) {
allColumnRangesBuilder.put(entry.getKey(), entry.getValue().columnRanges.get(entry.getKey()));
}
@ -620,7 +620,7 @@ public class OneRangePartitionEvaluator
Map<Slot, ColumnRange> allColumnRanges = allColumnRangesBuilder.build();
Builder<Slot, PartitionSlotInput> partitionSlotInputs =
ImmutableMap.builderWithExpectedSize(inputs.size() * 2);
ImmutableMap.builderWithExpectedSize(16);
for (Slot slot : inputs.keySet()) {
partitionSlotInputs.put(slot, new PartitionSlotInput(inputs.get(slot).result, allColumnRanges));
}