Github user hsuanyi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/489#discussion_r62117749
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/TestFunctionsWithTypeExpoQueries.java
 ---
    @@ -719,4 +727,73 @@ public void testWindowSumConstant() throws Exception {
         final String[] excludedPlan = {};
         PlanTestBase.testPlanMatchingPatterns(query, expectedPlan, 
excludedPlan);
       }
    +
    +  @Test // DRILL-4552
    +  public void testDecimalPlusWhenDecimalEnabled() throws Exception {
    +    final String query = "select cast('99' as decimal(9,0)) + cast('99' as 
decimal(9,0)) as col \n" +
    +        "from cp.`tpch/region.parquet` \n" +
    +        "limit 0";
    +
    +    try {
    +      final TypeProtos.MajorType majorTypeDouble = 
TypeProtos.MajorType.newBuilder()
    +          .setMinorType(TypeProtos.MinorType.FLOAT8)
    +          .setMode(TypeProtos.DataMode.REQUIRED)
    +          .build();
    +
    +      final List<Pair<SchemaPath, TypeProtos.MajorType>> 
expectedSchemaDouble = Lists.newArrayList();
    +      expectedSchemaDouble.add(Pair.of(SchemaPath.getSimplePath("col"), 
majorTypeDouble));
    +
    +      testBuilder()
    --- End diff --
    
    Addressed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to