Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
v1.4.0
-
None
Description
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.