### Question:
DrillOptiq { public static LogicalExpression toDrill(DrillParseContext context, RelNode input, RexNode expr) { return toDrill(context, Lists.newArrayList(input), expr); }  static LogicalExpression toDrill(DrillParseContext context, RelNode input, RexNode expr); static LogicalExpression toDrill(DrillParseContext context, List<RelNode> inputs, RexNode expr); static boolean isLiteralNull(RexLiteral literal); static final String UNSUPPORTED_REX_NODE_ERROR; }### Answer:
@Test public void testUnsupportedRexNode() { try { RelDataTypeFactory relFactory = new SqlTypeFactoryImpl(DrillRelDataTypeSystem.DRILL_REL_DATATYPE_SYSTEM); RexBuilder rex = new RexBuilder(relFactory); RelDataType anyType = relFactory.createSqlType(SqlTypeName.ANY); List<RexNode> emptyList = new LinkedList<>(); ImmutableList<RexFieldCollation> e = ImmutableList.copyOf(new RexFieldCollation[0]); RexNode window = rex.makeOver(anyType, SqlStdOperatorTable.AVG, emptyList, emptyList, e, null, null, true, false, false); DrillOptiq.toDrill(null, (RelNode) null, window); } catch (UserException e) { if (e.getMessage().contains(DrillOptiq.UNSUPPORTED_REX_NODE_ERROR)) { return; } Assert.fail("Hit exception with unexpected error message"); } Assert.fail("Failed to raise the expected exception"); }