boolean isRows = wndSpec.getWindowFrame().getWindowType() == WindowType.ROWS; w = cluster.getRexBuilder().makeOver(calciteAggFnRetType, calciteAggFn, calciteAggFnArgs, partitionKeys, ImmutableList.<RexFieldCollation> copyOf(orderKeys), lowerBound, upperBound, isRows, true, false, hiveAggInfo.m_distinct);
boolean isRows = wndSpec.getWindowFrame().getWindowType() == WindowType.ROWS; w = cluster.getRexBuilder().makeOver(calciteAggFnRetType, calciteAggFn, calciteAggFnArgs, partitionKeys, ImmutableList.<RexFieldCollation> copyOf(orderKeys), lowerBound, upperBound, isRows, true, false);
types.add(n.getType()); return getRexBuilder().makeOver( operator.inferReturnType(getTypeFactory(), types), operator,
@Test public void testUnsupportedRexNode() { try { // Create the data type factory. RelDataTypeFactory relFactory = SqlTypeFactoryImpl.INSTANCE; // Create the rex builder RexBuilder rex = new DremioRexBuilder(relFactory); RelDataType anyType = relFactory.createSqlType(SqlTypeName.ANY); List<RexNode> emptyList = new LinkedList<>(); ImmutableList<RexFieldCollation> e = ImmutableList.copyOf(new RexFieldCollation[0]); // create a dummy RexOver object. RexNode window = rex.makeOver(anyType, SqlStdOperatorTable.AVG, emptyList, emptyList, e, null, null, true, false, false, false); RexToExpr.toExpr(null, null, null, window); } catch (UserException e) { if (e.getMessage().contains(RexToExpr.UNSUPPORTED_REX_NODE_ERROR)) { // got expected error return return; } Assert.fail("Hit exception with unexpected error message"); } Assert.fail("Failed to raise the expected exception"); } }
: false; w = cluster.getRexBuilder().makeOver(calciteAggFnRetType, calciteAggFn, calciteAggFnArgs, partitionKeys, ImmutableList.<RexFieldCollation> copyOf(orderKeys), lowerBound, upperBound, isRows, true, false);