hit-lacus commented on issue #785: KYLIN-4117 Auto adjust data type of RelNode 
for intersect_count
URL: https://github.com/apache/kylin/pull/785#issuecomment-517891201
 
 
   ### Issue description
   
   
   ### Root Cause Analysis
   
   ### Desgin Evidence
   
   ### Test Evidence
   
   ```sql
   select 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-01']), 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-02']), 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-03']), 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-01', '2012-01-02']), 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-01', '2012-01-02', 
'2012-01-03'])
   from KYLIN_SALES 
   where part_dt in ('2012-01-01', '2012-01-02', '2012-01-03')
   
   
   select 
   intersect_count(OPS_USER_ID, part_dt, array[date '2012-01-01']), 
   intersect_count(OPS_USER_ID, part_dt, array[date '2012-01-02']), 
   intersect_count(OPS_USER_ID, part_dt, array[date '2012-01-03']), 
   intersect_count(OPS_USER_ID, part_dt, array[date '2012-01-01',date 
'2012-01-02']), 
   intersect_count(OPS_USER_ID, part_dt, array[date '2012-01-01',date 
'2012-01-02',date '2012-01-03'])
   from KYLIN_SALES 
   where part_dt in ('2012-01-01', '2012-01-02', '2012-01-03')
   
   
   select  LSTG_FORMAT_NAME, 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-01']), 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-02']), 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-03']), 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-01', '2012-01-02']), 
   intersect_count(OPS_USER_ID, part_dt, array[ '2012-01-01', '2012-01-02', 
'2012-01-03'])
   from KYLIN_SALES 
   where part_dt in ('2012-01-01', '2012-01-02', '2012-01-03')
   group by LSTG_FORMAT_NAME
   
   
   select  
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 0]), 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 3]), 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 15]), 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 0, 3]), 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 0, 3, 15])
   from KYLIN_SALES 
   where lstg_site_id in (0, 3, 15)
   
   
   select LSTG_FORMAT_NAME, 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 0]), 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 3]), 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 15]), 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 0, 3]), 
   intersect_count(OPS_USER_ID, lstg_site_id, array[ 0, 3, 15])
   from KYLIN_SALES 
   group by LSTG_FORMAT_NAME
   where lstg_site_id in (0, 3, 15)
   
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to