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

Zhiyong Liu commented on DRILL-850:
-----------------------------------

0: jdbc:drill:schema=dfs> alter session set `planner.enable_multiphase_agg` = 
false;                     
+------------+------------+                                                     
                         
|     ok     |  summary   |                                                     
                         
+------------+------------+                                                     
                         
| true       | planner.enable_multiphase_agg updated. |                         
                         
+------------+------------+                                                     
                         
1 row selected (0.031 seconds)                                                  
                         
0: jdbc:drill:schema=dfs> alter session set `planner.enable_hashagg` = false;   
                         
+------------+------------+                                                     
                         
|     ok     |  summary   |                                                     
                         
+------------+------------+                                                     
                         
| true       | planner.enable_hashagg updated. |                                
                         
+------------+------------+                                                     
                         
1 row selected (0.022 seconds)                                                  
                         
0: jdbc:drill:schema=dfs> select cast(c_groupby as varchar(4)), 
count(distinct(c_int)), count(distinct(c_bigint)), count(distinct(c_float4)), 
count(distinct(c_float8)) from data group by c_groupby;             
Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while 
running query.[error_id: "c27ac681-6a4e-4bb4-bc45-a9f32cd6121e"                 
                                                       
endpoint {                                                                      
                         
  address: "perfnode104.perf.lab"                                               
                         
  user_port: 31010                                                              
                         
  control_port: 31011                                                           
                         
  data_port: 31012                                                              
                         
}                                                                               
                         
error_type: 0
message: "Failure while running fragment. < UnsupportedOperationException:[ 
Failure finding function that runtime code generation expected.  Signature: 
compare_to( INT:OPTIONALVARBINARY:OPTIONAL,  ) returns INT:REQUIRED ]"
]
Error: exception while executing query (state=,code=0)
0: jdbc:drill:schema=dfs> alter session set `planner.enable_hashagg` = true;
+------------+------------+
|     ok     |  summary   |
+------------+------------+
| true       | planner.enable_hashagg updated. |
+------------+------------+
1 row selected (0.021 seconds)
0: jdbc:drill:schema=dfs> alter session set `planner.enable_multiphase_agg` = 
true;
+------------+------------+
|     ok     |  summary   |
+------------+------------+
| true       | planner.enable_multiphase_agg updated. |
+------------+------------+
1 row selected (0.031 seconds)
0: jdbc:drill:schema=dfs> select cast(c_groupby as varchar(4)), 
count(distinct(c_int)), count(distinct(c_bigint)), count(distinct(c_float4)), 
count(distinct(c_float8)) from data group by c_groupby;
+------------+------------+------------+------------+------------+
|   EXPR$0   |   EXPR$1   |   EXPR$2   |   EXPR$3   |   EXPR$4   |
+------------+------------+------------+------------+------------+
| ""         | 6          | 6          | 6          | 6          |
| abc        | 6          | 6          | 6          | 6          |
| ab         | 5          | 6          | 6          | 6          |
| a          | 5          | 5          | 5          | 5          |
+------------+------------+------------+------------+------------+
4 rows selected (3.274 seconds)

> support of multiple count(distinct) inconsistent
> ------------------------------------------------
>
>                 Key: DRILL-850
>                 URL: https://issues.apache.org/jira/browse/DRILL-850
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Zhiyong Liu
>
> git.commit.id.abbrev=01bf849
> git.commit.id=01bf8496b217781521c943cc1a9a38ed9f841288
> With planner.enable_multiphase_agg and planner.enable_hashagg set to false, 
> planner.enable_hashagg is encountered for the following query:
> select cast(c_groupby as varchar(4)), count(distinct(c_int)), 
> count(distinct(c_bigint)), count(distinct(c_float4)), 
> count(distinct(c_float8)) from data group by c_groupby;



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to