You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/11/22 08:07:26 UTC

[GitHub] [incubator-druid] SehanRathnayake opened a new issue #8927: Requests with period granularity give different results with Different Segment Granularities when the Origin time component overlaps with DST transition Time

SehanRathnayake opened a new issue #8927: Requests with period granularity give different results with Different Segment Granularities when the Origin  time component overlaps with DST transition Time
URL: https://github.com/apache/incubator-druid/issues/8927
 
 
   Requests with period granularity give different results with Different Segment Granularities when origin value has time component which overlaps DST transition.
   ### Affected Version
   0.16.0-incubating,
   
   ### Description
   
   When querying with period granularity type with period P1D  with origin value which time is 02:00:00 (which overlaps with DST transition on March 10 ) with America/Los_Angeles timezone give different results when datasource has DAY Segment Granularity vs Month Segment Granularity
   
   **Dataset**
   `
   {"timestamp":1552125600000,"type":"March 09, 2019 02:00:00 (am)","amount":10}
   {"timestamp":1552212000000,"type":"March 10, 2019 03:00:00 (am)","amount":10}
   {"timestamp":1553500800000,"type":"March 25, 2019 01:00:00 (am)","amount":10}
   {"timestamp":1554886800000,"type":"April 10, 2019 02:00:00 (am)","amount":10}
   `
   
   QueryGranularity : THIRTY_MINUTES 
   
   **Request** 
   
   ```javascript
    { 
      "queryType":"groupBy",
      "granularity":{ 
         "type":"period",
         "period":"P1D",
         "timeZone":"America/Los_Angeles",
         "origin":"2018-01-19T02:00:00.000-08:00"
      },
      "dataSource":{ 
         "type":"union",
         "dataSources":[ 
            "datasource"
         ]
      },
      "dimensions":[ 
         "type"
      ],
      "aggregations":[ 
         { 
            "type":"doubleSum",
            "name":"toatalSale",
            "fieldName":"sum_amount"
         }
      ],
      "intervals":[ 
         "2018-01-21T04:22:26.000+0000/2019-04-30T23:59:59.999+0000"
      ]
   }
   ```
   
   **case 1 : With DAY Segment Granularity** 
   
   ```javascript
   [ 
      { 
         "version":"v1",
         "timestamp":"2019-03-09T02:00:00.000-08:00",
         "event":{ 
            "toatalSale":10.0,
            "type":"March 09, 2019 02:00:00 (am)"
         }
      },
      { 
         "version":"v1",
         "timestamp":"2019-03-10T03:00:00.000-07:00",
         "event":{ 
            "toatalSale":10.0,
            "type":"March 10, 2019 03:00:00 (am)"
         }
      },
      { 
         "version":"v1",
         "timestamp":"2019-03-24T02:00:00.000-07:00",
         "event":{ 
            "toatalSale":10.0,
            "type":"March 25, 2019 01:00:00 (am)"
         }
      },
      { 
         "version":"v1",
         "timestamp":"2019-04-10T02:00:00.000-07:00",
         "event":{ 
            "toatalSale":10.0,
            "type":"April 10, 2019 02:00:00 (am)"
         }
      }
   ]
   ```
   
   **case 2 : Datasource with Month Segment Granularity**
   
   ```javascript
   [ 
      { 
         "version":"v1",
         "timestamp":"2019-03-09T02:00:00.000-08:00",
         "event":{ 
            "toatalSale":10.0,
            "type":"March 09, 2019 02:00:00 (am)"
         }
      },
      { 
         "version":"v1",
         "timestamp":"2019-03-10T03:00:00.000-07:00",
         "event":{ 
            "toatalSale":10.0,
            "type":"March 10, 2019 03:00:00 (am)"
         }
      },
      { 
         "version":"v1",
         "timestamp":"2019-03-24T03:00:00.000-07:00",
         "event":{ 
            "toatalSale":10.0,
            "type":"March 25, 2019 01:00:00 (am)"
         }
      },
      { 
         "version":"v1",
         "timestamp":"2019-04-10T02:00:00.000-07:00",
         "event":{ 
            "toatalSale":10.0,
            "type":"April 10, 2019 02:00:00 (am)"
         }
      }
   ]
   ```
   
   Here when Querying in the datasource with DAY segment Granularity 3rd bucket has start with 2019-03-24T02:00:00.000-07:00 where when Querying in the datasource with Month segment Granularity 3rd bucket has start with 2019-03-24T03:00:00.000-07:00. Which is inconsistent.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org