The difference is "Accept Partial: true" and "Accept Partial: false".
When running query on UI, it will truncate when exceeds a scan threshold (this is a protection mechanism to avoid too much resources costed with a bad-written query); and the UI will show the message that "the result set is partial", you may overlook it. With JDBC/ODBC drivers, there is no such mechanism; To fix the issue, please follow the suggestions in the error message. 2016-08-08 1:15 GMT+08:00 Sandeep Khurana <[email protected]>: > Log when query executes from Kylin UI > > ==========================[QUERY]=============================== > > SQL: SELECT dt.d_year, it.i_brand_id AS brand_id, it.i_brand AS brand, > sum(ss_ext_sales_price) AS sum_agg FROM TPCDS_QUERY3.STORE_SALES AS ss JOIN > TPCDS_QUERY3.DATE_DIM AS dt ON dt.d_date_sk = ss.ss_sold_date_sk JOIN > TPCDS_QUERY3.ITEM AS it ON ss.ss_item_sk = it.i_item_sk WHERE > it.i_manufact_id = 436 AND dt.d_moy = 1 GROUP BY dt.d_year, it.i_brand, > it.i_brand_id LIMIT 50000 > > User: ADMIN > > Success: true > > Duration: 1.107 > > Project: Project_tpcds_query3 > > Realization Names: [tpcds_query3] > > Cuboid Ids: [63] > > Total scan count: 50001 > > Result row count: 24 > > Accept Partial: true > > Is Partial Result: true > > Hit Cache: false > > Message: null > > ==========================[QUERY]=============================== > > On Sun, Aug 7, 2016 at 10:43 PM, Sandeep Khurana <[email protected]> > wrote: > >> I created a cube based on tpcds data. store_sales as fact and item , >> date_dim as dimensions.Cube name is tpcds_query3. >> >> The measures defined are sum on SS_EXT_SALES_PRICE . >> >> When I run below query from Kylin UI it returns the result quite fast, in >> couple of secs. But when I execute this from a jdbc program then the error >> is thrown. Below is log snippet. Question is , when it executes quite fast >> from Kylin UI then why jdbc call makes "Scan row count exceeded". Any >> property I need to set during jdbc call? >> >> ==========================[QUERY]=============================== >> >> SQL: SELECT dt.d_year, it.i_brand_id AS brand_id, it.i_brand AS brand, >> sum(ss_ext_sales_price) AS sum_agg FROM TPCDS_QUERY3.STORE_SALES AS ss JOIN >> TPCDS_QUERY3.DATE_DIM AS dt ON dt.d_date_sk = ss.ss_sold_date_sk JOIN >> TPCDS_QUERY3.ITEM AS it ON ss.ss_item_sk = it.i_item_sk WHERE >> it.i_manufact_id = 436 AND dt.d_moy = 1 GROUP BY dt.d_year, it.i_brand, >> it.i_brand_id LIMIT 500 >> >> User: ADMIN >> >> Success: false >> >> Duration: 0.0 >> >> Project: Project_tpcds_query3 >> >> Realization Names: [tpcds_query3] >> >> Cuboid Ids: [63] >> >> Total scan count: 0 >> >> Result row count: 0 >> >> Accept Partial: false >> >> Is Partial Result: false >> >> Hit Cache: false >> >> Message: Scan row count exceeded threshold: 10000000, please add filter >> condition to narrow down backend scan range, like where clause. >> >> while executing SQL: "SELECT dt.d_year, it.i_brand_id AS brand_id, >> it.i_brand AS brand, sum(ss_ext_sales_price) AS sum_agg FROM >> TPCDS_QUERY3.STORE_SALES AS ss JOIN TPCDS_QUERY3.DATE_DIM AS dt ON >> dt.d_date_sk = ss.ss_sold_date_sk JOIN TPCDS_QUERY3.ITEM AS it ON >> ss.ss_item_sk = it.i_item_sk WHERE it.i_manufact_id = 436 AND dt.d_moy = 1 >> GROUP BY dt.d_year, it.i_brand, it.i_brand_id LIMIT 500" >> >> ==========================[QUERY]=============================== >> >> >> > > > -- > Architect > Infoworks.io > http://Infoworks.io > -- Best regards, Shaofeng Shi
