-
- Downloads
[SPARK-16274][SQL] Implement xpath_boolean
## What changes were proposed in this pull request? This patch implements xpath_boolean expression for Spark SQL, a xpath function that returns true or false. The implementation is modelled after Hive's xpath_boolean, except that how the expression handles null inputs. Hive throws a NullPointerException at runtime if either of the input is null. This implementation returns null if either of the input is null. ## How was this patch tested? Created two new test suites. One for unit tests covering the expression, and the other for end-to-end test in SQL. Author: petermaxlee <petermaxlee@gmail.com> Closes #13964 from petermaxlee/SPARK-16274.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala 2 additions, 0 deletions...apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/xml/XPathBoolean.scala 58 additions, 0 deletions...che/spark/sql/catalyst/expressions/xml/XPathBoolean.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/xml/XPathExpressionSuite.scala 61 additions, 0 deletions...k/sql/catalyst/expressions/xml/XPathExpressionSuite.scala
- sql/core/src/test/scala/org/apache/spark/sql/XmlFunctionsSuite.scala 32 additions, 0 deletions...c/test/scala/org/apache/spark/sql/XmlFunctionsSuite.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala 1 addition, 1 deletion.../scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala
Loading
Please register or sign in to comment