MaxGekk commented on issue #25022: [SPARK-24695][SQL] Move `CalendarInterval` to org.apache.spark.sql.types package URL: https://github.com/apache/spark/pull/25022#issuecomment-532993355 > @MaxGekk WDYT? I don't like this special case of exposing `CalendarIntervalType` as `org.apache.spark.unsafe.types.CalendarInterval`. I would follow the existing approach for other types `DateType`, `TimestampType` and etc., and convert `CalendarIntervalType` to a Java standard type like `java.time.Duration`/`java.time.Period`. Otherwise we will pollute users apps by not-standard types. In any case, Spark cannot provide all functions/libraries that already exist for standard Java types. Since `CalendarInterval` has been already exposed partially. I would keep this as is (and maybe deprecate it), and exposed standard types in collect(), literals and UDF additionally.
---------------------------------------------------------------- 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]
