[ https://issues.apache.org/jira/browse/SPARK-38317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497926#comment-17497926 ]
Max Gekk commented on SPARK-38317: ---------------------------------- This is the expected behavior, Spark truncates java.time.Period to months. > Encoding of java.time.Period always results in "INTERVAL '0-0' YEAR TO MONTH" > ----------------------------------------------------------------------------- > > Key: SPARK-38317 > URL: https://issues.apache.org/jira/browse/SPARK-38317 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.2.0, 3.2.1 > Reporter: Jolan Rensen > Priority: Major > > {code} > val dates = Seq( > Period.ZERO, > Period.ofWeeks(2), > ).toDS() > dates.show(false) > {code} > Results in: > {code} > +----------------------------+ > |value | > +----------------------------+ > |INTERVAL '0-0' YEAR TO MONTH| > |INTERVAL '0-0' YEAR TO MONTH| > +----------------------------+ > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org