Sorry for the wrong description and thanks for the explaination.
I have another question on this.
Case1
select merchant_name,dt_day,count(*)
from session_view_shop_0
where merchant_name like '%深海新创手机%'
and dt_year='2016'
and dt_month='07'
and dt_day >='25'
and dt_day <='28'
group by merchant_name,dt_day
2016-08-05 09:25:06,263 INFO [http-bio-7070-exec-10]
dict.BuildInFunctionTransformer:66 : Translated {LIKE(KYLIN_REPORT_DB.SESSION_
VIEW_SHOP_0.MERCHANT_NAME,%深海新创手机%)} to IN clause:
{KYLIN_REPORT_DB.SESSION_VIEW_SHOP_0.MERCHANT_NAME IN []}
Result1
深海新创手机专营店80002972 28 6360
深海新创手机专营店80002972 27 5501
深海新创手机专营店80002972 26 4830
Case 2
select merchant_name,dt_day,count(*)
from session_view_shop_0
where merchant_name like '%深海新创%'
and dt_year='2016'
and dt_month='07'
and dt_day >='25'
and dt_day <='28'
group by merchant_name,dt_day
2016-08-05 09:37:55,469 INFO [http-bio-7070-exec-15]
dict.BuildInFunctionTransformer:66 : Translated {LIKE(KYLIN_REPORT_DB.SESSION_
VIEW_SHOP_0.MERCHANT_NAME,%深海新创%)} to IN clause:
{KYLIN_REPORT_DB.SESSION_VIEW_SHOP_0.MERCHANT_NAME IN [深海新创专营店80002972]}
Result2
深海新创专营店80002972 25 5283
’深海新创手机专营店80002972’ is expected in result2 , as it exists which case1 shows.
发件人: mahongbin [via Apache Kylin] [mailto:[email protected]]
发送时间: 2016年8月4日 22:58
收件人: yubo-ds1(于渤.大数据中心.大数据平台部)
主题: Re: Question abount BuildInFunctionTransformer
To me the translation is expected behavior
On Thu, Aug 4, 2016 at 10:47 PM, Yiming Liu <[hidden
email]</user/SendEmail.jtp?type=node&node=5501&i=0>> wrote:
> Why do you think that's not expectation? What's the expected translation?
> Kylin will encode the dimension column original value into internal
> representation. And based on these encoding dictionary, Kylin would rewrite
> some SQL for better performance. In your case, the LIKE statement was
> translated into IN, then Kylin would find the query result by the key
> directly. It does not need filter all raw data.
>
> 2016-08-04 18:20 GMT+08:00 [hidden
> email]</user/SendEmail.jtp?type=node&node=5501&i=1> <[hidden
> email]</user/SendEmail.jtp?type=node&node=5501&i=2>>:
>
> >
> >
> >
> > Hi all,
> >
> > When we search with a sql “like clause”, we found in the log there will
> be
> > a
> > BuildInFunctionTransformer which will transform the “like clause” into
> “in
> > clause”
> > But values seems not exactly right. Below is my usecases.
> >
> > Case1 translate '%深海%' to [深海新创专营店80002972, 义深海官方旗舰店80011438]
> > Case 2 translate '%深海新创%' to [深海新创专营店80002972]
> >
> > This is not espected.
> >
> > Is this a bug or can anyone help to explain? Thanks.
> >
> > 1.
> > sql:
> >
> > select merchant_name,*
> > from session_view_shop_0
> > where merchant_name like '%深海%'
> > and dt_year='2016'
> > and dt_month='07'
> > and dt_day >='25'
> > and dt_day <='28'
> >
> > 2016-08-04 17:38:46,095 INFO [http-bio-7070-exec-31]
> > dict.BuildInFunctionTransformer:66 : Translated
> > {LIKE(KYLIN_REPORT_DB.SESSION_
> > VIEW_SHOP_0.MERCHANT_NAME,%深海%)} to IN clause:
> > {KYLIN_REPORT_DB.SESSION_VIEW_SHOP_0.MERCHANT_NAME IN [深海新创专营店80002972,
> 义深
> > 海官方旗舰店80011438]}
> >
> > 2.
> > Sql:
> >
> > select merchant_name,*
> > from session_view_shop_0
> > where merchant_name like '%深海新创%'
> > and dt_year='2016'
> > and dt_month='07'
> > and dt_day >='25'
> > and dt_day <='28'
> >
> > 2016-08-04 17:41:52,321 INFO [http-bio-7070-exec-31]
> > dict.BuildInFunctionTransformer:66 : Translated
> > {LIKE(KYLIN_REPORT_DB.SESSION_VIEW_SHOP_0.MERCHANT_NAME,%深海新创%)} to IN
> > clause: {KYLIN_REPORT_DB.SESSION_VIEW_SHOP_0.MERCHANT_NAME IN
> > [深海新创专营店80002972]}
> >
> >
> > Kylin version:apache-kylin-1.5.2.1-HBase1.x-bin.tar.gz
> >
> >
> >
> > --
> > View this message in context: http://apache-kylin.74782.x6.
> > nabble.com/Question-abount-BuildInFunctionTransformer-tp5499.html
> > Sent from the Apache Kylin mailing list archive at Nabble.com.
> >
>
>
>
> --
> With Warm regards
>
> Yiming Liu (刘一鸣)
>
--
Regards,
*Bin Mahone | 马洪宾*
________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-kylin.74782.x6.nabble.com/Question-abount-BuildInFunctionTransformer-tp5499p5501.html
To start a new topic under Apache Kylin, email [email protected]
To unsubscribe from Apache Kylin, click
here<http://apache-kylin.74782.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=eXViby1kczFAeW9sbzI0LmNvbXwxfC0xMTE5OTYzOTg4>.
NAML<http://apache-kylin.74782.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context:
http://apache-kylin.74782.x6.nabble.com/Question-abount-BuildInFunctionTransformer-tp5499p5509.html
Sent from the Apache Kylin mailing list archive at Nabble.com.