You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/07/14 20:01:41 UTC

[GitHub] [incubator-pinot] fx19880617 opened a new issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

fx19880617 opened a new issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704


   Need to support this functionality in datetimeConvertUdf. This function should be able to convert time to the first day of corresponding week/month/year.


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



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


[GitHub] [incubator-pinot] fx19880617 commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-658384412


   cc @kishoreg @Jackie-Jiang @npawar 


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



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


[GitHub] [incubator-pinot] fx19880617 edited a comment on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
fx19880617 edited a comment on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-683144571


   Fixing an issue https://github.com/apache/incubator-pinot/pull/5940 which prevents using functions introduced in #5438 


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



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


[GitHub] [incubator-pinot] Jackie-Jiang commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-675075347


   @fx19880617 @deemoliu @mr-agrwal We recently merged this PR for more datetime support: https://github.com/apache/incubator-pinot/pull/5438
   I think it covers the use cases in this ticket


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



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


[GitHub] [incubator-pinot] deemoliu commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
deemoliu commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-675040330


   Hello @mr-agrwal, may I ask you about the ETA on this feature?
   
   I am a Pinot user from Uber and we are looking for a solution to support the following Presto SQL.
   I discussed with @fx19880617 and I believe your change on this ticket is required for supporting the below query.
   
   `select
     date_trunc(
       'week',
       cast(eater_request_datestr_local as date)
     ) as datestr,
     sum(item_sales_local)
   from
     pinotprod.restaurant_bi_item_sold.restaurant_bi_item_sold
   where
     eater_request_datestr_local >= '2020-07-24'
   group BY
     1
   `
   


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



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


[GitHub] [incubator-pinot] kishoreg commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
kishoreg commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-658385082


   it's probably better to add new short udf instead of overloading existing udf. Do you have examples from other SQL engines for these operations?


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



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


[GitHub] [incubator-pinot] fx19880617 commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-682099489


   @deemoliu can you verify that your needs is satisfied with #5438 ?
   We can then working on presto side to do query rewrite for this.


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



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


[GitHub] [incubator-pinot] fx19880617 commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-683144571


   Fixing an issue which prevents using functions introduced in #5438 


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



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


[GitHub] [incubator-pinot] deemoliu commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
deemoliu commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-675094486


   Thanks a lot @Jackie-Jiang I will take a look and give it a try.


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



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


[GitHub] [incubator-pinot] Jackie-Jiang closed issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang closed issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704


   


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



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


[GitHub] [incubator-pinot] mr-agrwal commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
mr-agrwal commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-667167632


   I can take it up.


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



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


[GitHub] [incubator-pinot] fx19880617 commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-671852467


   We may also want to support this as granular in `datetimeConvertUdf`, so that we can take the pushdown from presto side for function: `date_trunc`(https://prestodb.io/docs/current/functions/datetime.html).
   
   |Unit | Example Truncated Value|
   |-- | --|
   |second | 2001-08-22 03:04:05.000
   |minute | 2001-08-22 03:04:00.000
   |hour | 2001-08-22 03:00:00.000
   |day | 2001-08-22 00:00:00.000
   |week | 2001-08-20 00:00:00.000
   |month | 2001-08-01 00:00:00.000
   |quarter | 2001-07-01 00:00:00.000
   |year | 2001-01-01 00:00:00.000
   
   ```
   The above examples use the timestamp 2001-08-22 03:04:05.321 as the input.
   
   date_trunc(unit, x) → [same as input]
   Returns x truncated to unit.
   ```
   Currently we are missing `week`/`month`/`quarter`/`year`.


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



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


[GitHub] [incubator-pinot] fx19880617 commented on issue #5704: Support toWeek/toMonth/toYear in datetimeConvertUdf

Posted by GitBox <gi...@apache.org>.
fx19880617 commented on issue #5704:
URL: https://github.com/apache/incubator-pinot/issues/5704#issuecomment-658393469


   sql use functions like `year()`/`month()`/`week()` to extract year from a given date.
   RFE: https://prestodb.io/docs/current/functions/datetime.html
   See: Extraction Function section.


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



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