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 2022/10/17 14:11:46 UTC

[GitHub] [druid] hnakamor commented on issue #13230: SQL-based ingestion cannot generate daily segments taking time zone into account.

hnakamor commented on issue #13230:
URL: https://github.com/apache/druid/issues/13230#issuecomment-1280926592

   @LakshSingla Thank you for your response.
   
   I have tried the matter you commented on.
   ```
   INSERT INTO inline_data
   WITH ext AS (SELECT *
   FROM TABLE(
     EXTERN(
       '{"type":"inline","data":"{\"time\":\"2000-01-01T15:00:00\"}"}',
       '{"type":"json"}',
       '[{"name":"time","type":"string"}]'
     )
   ))
   SELECT TIME_PARSE("time") AS __time
   FROM ext
   WHERE "time" >= TIMESTAMP '2000-01-01 15:00:00' AND "time" < TIMESTAMP '2000-01-02 15:00:00'
   PARTITIONED BY ALL
   ```
   In this case, the segment interval generated is `-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z`.
   ex) `inline_data_-146136543-09-08T08:23:32.096Z_146140482-04-24T15:36:27.903Z_2022-10-17T12:53:06.938Z`
   `REPLACE INTO inline_data OVERWRITE ALL` gave the same result.
   
   `REPLACE INTO inline_data OVERWRITE WHERE __time >= TIMESTAMP '2000-01-01 15:00:00' AND __time < TIMESTAMP '2000-01-02 15:00:00'` is the following error occurs.
   ```
   Error: Plan validation failed
   
   OVERWRITE WHERE clause contains an interval [2000-01-01T15:00:00.000Z/2000-01-02T15:00:00.000Z] which is not aligned with PARTITIONED BY granularity AllGranularity
   
   org.apache.calcite.tools.ValidationException
   ```
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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