You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/06/22 08:19:20 UTC

[GitHub] [spark] Peng-Lei edited a comment on pull request #33014: [SPARK-35728][SQL][TESTS] Check multiply/divide of day-time intervals of any fields by numeric

Peng-Lei edited a comment on pull request #33014:
URL: https://github.com/apache/spark/pull/33014#issuecomment-865680512


   > > @MaxGekk
   > > INTERVAL DAY * or / numeric should return INTERVAL DAY
   > > INTERVAL DAY TO HOUR * or / numeric should return INTERVAL DAY TO HOUR
   > > right ?
   > 
   > @Peng-Lei Don't think so. Especially about /
   > 
   > > but now return default DayTimeIntervalType()
   > 
   > This type doesn't loose info at least. I would consider `DayTimeIntervalType(SECOND)` but the default one `DayTimeIntervalType() == DayTimeIntervalType(DAY, SECOND)` is good enough.
   
   @MaxGekk Thank you for your explanation. Special cases
   eg: I think if  INTERVAL DAY * numeric should return INTERVAL DAY doesn't loose info, but INTERVAL DAY / numeric maybe loose  info. If  INTERVAL DAY * numeric return INTERVAL DAY, when DateType +/- INTERVAL DAY is better?
   expr: DateType +/- INTERVAL DAY * numeric 


-- 
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: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org