-
- Downloads
[SPARK-17013][SQL] Parse negative numeric literals
## What changes were proposed in this pull request? This patch updates the SQL parser to parse negative numeric literals as numeric literals, instead of unary minus of positive literals. This allows the parser to parse the minimal value for each data type, e.g. "-32768S". ## How was this patch tested? Updated test cases. Author: petermaxlee <petermaxlee@gmail.com> Closes #14608 from petermaxlee/SPARK-17013.
Showing
- sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 7 additions, 7 deletions...in/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala 2 additions, 2 deletions...rg/apache/spark/sql/catalyst/expressions/arithmetic.scala
- sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out 13 additions, 13 deletions...e/src/test/resources/sql-tests/results/arithmetic.sql.out
- sql/core/src/test/resources/sql-tests/results/literals.sql.out 13 additions, 31 deletions...ore/src/test/resources/sql-tests/results/literals.sql.out
- sql/hive/src/test/scala/org/apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala 2 additions, 2 deletions...apache/spark/sql/catalyst/ExpressionSQLBuilderSuite.scala
Loading
Please register or sign in to comment