[ https://issues.apache.org/jira/browse/SPARK-35037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17319696#comment-17319696 ]
Apache Spark commented on SPARK-35037: -------------------------------------- User 'MaxGekk' has created a pull request for this issue: https://github.com/apache/spark/pull/32134 > Recognize sign before the interval string in literals > ----------------------------------------------------- > > Key: SPARK-35037 > URL: https://issues.apache.org/jira/browse/SPARK-35037 > Project: Spark > Issue Type: Sub-task > Components: SQL > Affects Versions: 3.2.0 > Reporter: Max Gekk > Assignee: Max Gekk > Priority: Major > > According to the SQL standard: > {code:java} > <interval literal> ::= > INTERVAL [ <sign> ] <interval string> <interval qualifier> > <interval string> ::= > <quote> <unquoted interval string> <quote> > <unquoted interval string> ::= > [ <sign> ] { <year-month literal> | <day-time literal> } > <sign> ::= > <plus sign> > | <minus sign> > {code} > but the parsing fails: > {code:java} > spark-sql> select interval -'1-1' year to month; > Error in query: > mismatched input 'to' expecting {<EOF>, ';'}(line 1, pos 28) > == SQL == > select interval -'1-1' year to month > ----------------------------^^^ > {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