[ https://issues.apache.org/jira/browse/SPARK-36851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17420092#comment-17420092 ]
Max Gekk commented on SPARK-36851: ---------------------------------- There is a workaround: {code:sql} spark-sql> select interval '-1' year; -1-0 {code} > Incorrect parsing of negative ANSI typed interval literals > ---------------------------------------------------------- > > Key: SPARK-36851 > URL: https://issues.apache.org/jira/browse/SPARK-36851 > Project: Spark > Issue Type: Sub-task > Components: SQL > Affects Versions: 3.2.0 > Reporter: Max Gekk > Priority: Major > > If start field and end field are the same, parser doesn't take into account > the sign before interval literal string. For example: > Works fine: > {code:sql} > spark-sql> select interval -'1-1' year to month; > -1-1 > {code} > Incorrect result: > {code:sql} > spark-sql> select interval -'1' year; > 1-0 > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org