Shaofeng SHI created KYLIN-1420:
-----------------------------------
Summary: Query returns empty result on partition column's boundary
condition
Key: KYLIN-1420
URL: https://issues.apache.org/jira/browse/KYLIN-1420
Project: Kylin
Issue Type: Bug
Components: Query Engine
Affects Versions: v2.0
Reporter: Shaofeng SHI
Assignee: Shaofeng SHI
Fix For: v2.0
This issue is reported by an user. The cube has a "month_end_dt" column as the
partition column. In the first segment, it built the data from 2015-01-01 to
2016-01-01; The second segment it built the data after 2016-01-01.
The queries which doesn't have filtering condition works as expected, such as:
select month_end_dt,count(*) from fact_table group by month_end_dt order by
month_end_dt;
The result set includes the records for each month;
But when filter on the month_end_date='2015-12-31' it is returning 0 records:
select month_end_dt, count(*) from fact_table where month_end_dt='2015-12-31'
group by month_end_dt
After doing some investigation, identify it is a bug in v2 query engine: In
CubeSegmentScanner.getSegmentStartAndEnd(), it uses -1 as 'roundingFlag' for
cubeSeg.getDateRangeEnd(), which may get a smaller value than the cubeSegment's
end date; While in GTScanRangePlanner.newScanRange(), it still treat the value
as a closed condition, that caused the query on boundary condition returns
empty directly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)