@Test
  public void testSameDecimalLiteralDifferentPrecision() {

    final RexBuilder rexBuilder = relBuilder.getRexBuilder();
    RelDataType decimalType30 = rexBuilder.getTypeFactory().createSqlType(SqlTypeName.DECIMAL, 30, 5);
    RexNode lita30 = rexBuilder.makeLiteral(10000, decimalType30, true);
    RexNode litb30 = rexBuilder.makeLiteral(11000, decimalType30, true);

    RelDataType decimalType14 = rexBuilder.getTypeFactory().createSqlType(SqlTypeName.DECIMAL, 14, 5);
    RexNode lita14 = rexBuilder.makeLiteral(10000, decimalType14, true);
    RexNode litb14 = rexBuilder.makeLiteral(11000, decimalType14, true);

    final RelNode basePlan = relBuilder
          .scan("t")
          .filter(and(relBuilder,
                  relBuilder.call(HiveIn.INSTANCE, relBuilder.field("f2"), lita30, litb30),
                  relBuilder.call(HiveIn.INSTANCE, relBuilder.field("f2"), lita14, litb14)))
          .build();

    planner.setRoot(basePlan);
    RelNode optimizedRelNode = planner.findBestExp();

    HiveFilter filter = (HiveFilter) optimizedRelNode;
    RexNode condition = filter.getCondition();
    System.out.println(condition);
    assertEquals("IN($1, 10000:DECIMAL(19, 5), 11000:DECIMAL(19, 5))", condition.toString());
  }
Despite that extraction happen at a higher level; nested parts should also be handled
ql/src/test/org/apache/hadoop/hive/ql/optimizer/calcite/rules/TestHivePointLookupOptimizerRule.java