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

weijie.tong commented on DRILL-5696:
------------------------------------

The sql is like " select
 (d.trade_cnt - d2.trade_cnt)/CAST(d2.trade_cnt AS DECIMAL(28,4)) as 
trade_cnt_wr
,(d.trade_amt - d2.trade_amt)/CAST(d2.trade_amt AS DECIMAL(28,4)) as 
trade_amt_wr
,(d.trade_shop_cnt - d2.trade_shop_cnt)/CAST(d2.trade_shop_cnt AS 
DECIMAL(28,4)) as trade_shop_cnt_wr
,(d.online_shop_cnt - d2.online_shop_cnt)/CAST(d2.online_shop_cnt AS 
DECIMAL(28,4)) as online_shop_cnt_wr
,CAST((d.trade_shop_rate - d2.trade_shop_rate) AS 
DECIMAL(28,4))/CAST(d2.trade_shop_rate AS DECIMAL(28,4)) as trade_shop_rate_wr
,(d.offline_item_cnt - d2.offline_item_cnt)/CAST(d2.offline_item_cnt AS 
DECIMAL(28,4)) as offline_item_cnt_wr
,(d.business_amt_per_cnt - 
d2.business_amt_per_cnt)/CAST(d2.business_amt_per_cnt AS DECIMAL(28,4)) as 
business_amt_per_cnt_wr
,(d.order_amt_per_cnt - d2.order_amt_per_cnt)/CAST(d2.order_amt_per_cnt AS 
DECIMAL(28,4)) as order_amt_per_cnt_wr
,(d.new_shop_cnt - d2.new_shop_cnt)/CAST(d2.new_shop_cnt AS DECIMAL(28,4)) as 
new_shop_cnt_wr
,(d.offline_shop_cnt - d2.offline_shop_cnt)/CAST(d2.offline_shop_cnt AS 
DECIMAL(28,4)) as offline_shop_cnt_wr
,(d.item_use_cnt - d2.item_use_cnt)/CAST(d2.item_use_cnt AS DECIMAL(28,4)) as 
item_use_cnt_wr
,(d.item_shop_rate - d2.item_shop_rate)/CAST(d2.item_shop_rate AS 
DECIMAL(28,4)) as item_shop_rate_wr
,(d.discount_trd_cnt - d2.discount_trd_cnt)/CAST(d2.discount_trd_cnt AS 
DECIMAL(28,4)) as discount_trd_cnt_wr
,(d.discount_shop_cnt - d2.discount_shop_cnt)/CAST(d2.discount_shop_cnt AS 
DECIMAL(28,4)) as discount_shop_cnt_wr
,(d.crm_shop_cnt - d2.crm_shop_cnt)/CAST(d2.crm_shop_cnt AS DECIMAL(28,4)) as 
crm_shop_cnt_wr
,(d.crm_shop_rate - d2.crm_shop_rate)/CAST(d2.crm_shop_rate AS DECIMAL(28,4)) 
as crm_shop_rate_wr
,(d.trade_cnt_voucher - d2.trade_cnt_voucher)/CAST(d2.trade_cnt_voucher AS 
DECIMAL(28,4)) as trade_cnt_voucher_wr
,(d.trade_amt_voucher - d2.trade_amt_voucher)/CAST(d2.trade_amt_voucher AS 
DECIMAL(28,4)) as trade_amt_voucher_wr
,(d.trade_cnt_per_shop - d2.trade_cnt_per_shop)/CAST(d2.trade_cnt_per_shop AS 
DECIMAL(28,4)) as trade_cnt_per_shop_wr 
from xxx"

before we change to JDK 8 ,the compile time is nearly 20 seconds ,  after that 
, the compile time is nearly 2 seconds. 





> change default compiler strategy
> --------------------------------
>
>                 Key: DRILL-5696
>                 URL: https://issues.apache.org/jira/browse/DRILL-5696
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - Codegen
>    Affects Versions: 1.9.0, 1.10.0, 1.11.0
>            Reporter: weijie.tong
>
> at our production ,when we have more than 20 agg expression, the  compile 
> time is high using the default janino.  but when changed to  jdk compiler,we 
> gain fewer compile time than the janino one. Our product jdk version is 1.8. 
> So the default one should be JDK , if user's jdk version is upper than 1.7. 
> We should add another check condition to the ClassCompilerSelector.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to