Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-1420

Query returns empty result on partition column's boundary condition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • v1.4.0
    • v1.4.0
    • Query Engine
    • 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.

      Attachments

        Activity

          People

            shaofengshi Shao Feng Shi
            shaofengshi Shao Feng Shi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: