[ 
https://issues.apache.org/jira/browse/DRILL-6094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16452482#comment-16452482
 ] 

ASF GitHub Bot commented on DRILL-6094:
---------------------------------------

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

    https://github.com/apache/drill/pull/1232#discussion_r184051298
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestFixedlenDecimal.java
 ---
    @@ -20,61 +20,74 @@
     import org.apache.drill.categories.UnlikelyTest;
     import org.apache.drill.test.BaseTestQuery;
     import org.apache.drill.exec.planner.physical.PlannerSettings;
    -import org.junit.BeforeClass;
     import org.junit.Test;
     import org.junit.experimental.categories.Category;
     
     @Category({UnlikelyTest.class})
     public class TestFixedlenDecimal extends BaseTestQuery {
    -  // enable decimal data type
    -  @BeforeClass
    -  public static void enableDecimalDataType() throws Exception {
    -    test(String.format("alter session set `%s` = true", 
PlannerSettings.ENABLE_DECIMAL_DATA_TYPE_KEY));
    -  }
    -
       private static final String DATAFILE = 
"cp.`parquet/fixedlenDecimal.parquet`";
     
       @Test
       public void testNullCount() throws Exception {
    -    testBuilder()
    -        .sqlQuery("select count(*) as c from %s where department_id is 
null", DATAFILE)
    -        .unOrdered()
    -        .baselineColumns("c")
    -        .baselineValues(1L)
    -        .build()
    -        .run();
    +    try {
    +      alterSession(PlannerSettings.ENABLE_DECIMAL_DATA_TYPE_KEY, true);
    +      testBuilder()
    +          .sqlQuery("select count(*) as c from %s where department_id is 
null", DATAFILE)
    +          .unOrdered()
    +          .baselineColumns("c")
    +          .baselineValues(1L)
    +          .build()
    +          .run();
    +    } finally {
    +      resetSessionOption(PlannerSettings.ENABLE_DECIMAL_DATA_TYPE_KEY);
    +    }
       }
     
       @Test
       public void testNotNullCount() throws Exception {
    -    testBuilder()
    -        .sqlQuery("select count(*) as c from %s where department_id is not 
null", DATAFILE)
    -        .unOrdered()
    -        .baselineColumns("c")
    -        .baselineValues(106L)
    -        .build()
    -        .run();
    +    try {
    +      alterSession(PlannerSettings.ENABLE_DECIMAL_DATA_TYPE_KEY, true);
    +      testBuilder()
    +          .sqlQuery("select count(*) as c from %s where department_id is 
not null", DATAFILE)
    +          .unOrdered()
    +          .baselineColumns("c")
    +          .baselineValues(106L)
    +          .build()
    --- End diff --
    
    Thanks, replaced here and in other places.


> Decimal data type enhancements
> ------------------------------
>
>                 Key: DRILL-6094
>                 URL: https://issues.apache.org/jira/browse/DRILL-6094
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.12.0
>            Reporter: Volodymyr Vysotskyi
>            Assignee: Volodymyr Vysotskyi
>            Priority: Major
>              Labels: doc-impacting
>             Fix For: 1.14.0
>
>
> Currently, Decimal types are disabled by default since existing Decimal 
> implementation has a lot of flaws and performance problems. The goal of thisĀ 
> Jira to describe majority of them and possible ways of improving existing 
> implementation to be able to enable Decimal data types by default.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to