MaxGekk commented on issue #26177: [SPARK-29520][SS] Fix checks of negative intervals URL: https://github.com/apache/spark/pull/26177#issuecomment-544222566 > It's simpler to just check months >= 0 && days >= 0 && microseconds >= 0 ... I do believe the caller should not depend on how many fields interval has, 2 now, 3 after your PR or maybe 5 in the future. What's matter is negative or not user's interval. > ... and let user to choose their own combination to pass this constraint. Users should struggle to pass the constraints. Any combination of non-negative interval should work. > If we make them convertible, things can be a bit more complex. I mean, you have to make some assumption to convert the fields and take care of them. Such assumption has been already made in Structured Streaming code. It is 31 days per months. Nothing more is needed. Splitting microseconds to days and microseconds should not require more assumptions.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
