To me the translation is expected behavior On Thu, Aug 4, 2016 at 10:47 PM, Yiming Liu <[email protected]> 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 [email protected] <[email protected]>: > > > > > > > > > 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 | 马洪宾*
