Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
cgivre committed Nov 14, 2024
1 parent 8814989 commit eff3b25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ public static MajorType.Builder calculateTypePrecisionAndScale(MajorType leftTyp
return typeBuilder.setPrecision(Math.max(leftType.getPrecision(), rightType.getPrecision()));
}

MinorType minorType = leftType.getMinorType();s
MinorType minorType = leftType.getMinorType();
if (isDecimalType(leftType)) {
int scale = Math.max(leftType.getScale(), rightType.getScale());
// resulting precision should take into account resulting scale value and be calculated as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,40 +188,6 @@ protected void createKeysAndExprs() {
aggCall.e.getType(),
aggCall.e.getName());

/*
SqlAggFunction aggFunction,
boolean distinct,
boolean approximate,
boolean ignoreNulls,
List<Integer> argList,
int filterArg,
@Nullable ImmutableBitSet distinctKeys,
RelCollation collation,
RelDataType type,
@Nullable String name
SqlAggFunction aggFunction,
boolean distinct,
boolean approximate,
boolean ignoreNulls,
List<RexNode> rexList,
List<Integer> argList,
int filterArg,
@Nullable ImmutableBitSet distinctKeys, RelCollation collation,
RelDataType type, @Nullable String name
public static AggregateCall create(SqlAggFunction aggFunction, boolean distinct, boolean approximate, boolean ignoreNulls,
List<Integer> argList, int filterArg,
@Nullable ImmutableBitSet distinctKeys, RelCollation collation,
RelDataType type, @Nullable String name) {
final boolean distinct2 = distinct
&& (aggFunction.getDistinctOptionality() != Optionality.IGNORED);
return new AggregateCall(aggFunction, distinct2, approximate, ignoreNulls,
argList, filterArg, distinctKeys, collation, type, name);
}
*/

phase2AggCallList.add(newAggCall);
} else {
AggregateCall newAggCall =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
package org.apache.drill.exec.planner.sql.conversion;

import java.math.BigDecimal;

import org.apache.calcite.rel.type.RelDataType;
import org.apache.calcite.rel.type.RelDataTypeFactory;
import org.apache.calcite.rex.RexBuilder;
Expand All @@ -30,6 +28,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.math.BigDecimal;

class DrillRexBuilder extends RexBuilder {

private static final Logger logger = LoggerFactory.getLogger(DrillRexBuilder.class);
Expand Down

0 comments on commit eff3b25

Please sign in to comment.