aboutsummaryrefslogtreecommitdiff
path: root/sql/hive
diff options
context:
space:
mode:
authorpetermaxlee <petermaxlee@gmail.com>2016-06-30 09:27:48 +0800
committerWenchen Fan <wenchen@databricks.com>2016-06-30 09:27:48 +0800
commitd3af6731fa270842818ed91d6b4d14708ddae2db (patch)
treece2a17e0864be2cf6bc7cde83a451c80ffba3de1 /sql/hive
parent831a04f5d152d1839c0edfdf65bb728aa5957f16 (diff)
downloadspark-d3af6731fa270842818ed91d6b4d14708ddae2db.tar.gz
spark-d3af6731fa270842818ed91d6b4d14708ddae2db.tar.bz2
spark-d3af6731fa270842818ed91d6b4d14708ddae2db.zip
[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.
Diffstat (limited to 'sql/hive')
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala
index 2589b9d4a0..fa560a044b 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala
@@ -241,7 +241,7 @@ private[sql] class HiveSessionCatalog(
"elt", "hash", "java_method", "histogram_numeric",
"map_keys", "map_values",
"parse_url", "percentile", "percentile_approx", "reflect", "sentences", "stack", "str_to_map",
- "xpath", "xpath_boolean", "xpath_double", "xpath_float", "xpath_int", "xpath_long",
+ "xpath", "xpath_double", "xpath_float", "xpath_int", "xpath_long",
"xpath_number", "xpath_short", "xpath_string",
// table generating function