From 6e9bca7f674f57a3cbd66f04550ca1080682707a Mon Sep 17 00:00:00 2001 From: gatorsmile Date: Sat, 15 Jul 2017 17:23:03 -0700 Subject: [PATCH 1/2] fix. --- .../sql-tests/results/comparator.sql.out | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sql/core/src/test/resources/sql-tests/results/comparator.sql.out b/sql/core/src/test/resources/sql-tests/results/comparator.sql.out index afc7b5448b7b6..0706d8da432cc 100644 --- a/sql/core/src/test/resources/sql-tests/results/comparator.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/comparator.sql.out @@ -5,14 +5,26 @@ -- !query 0 select x'00' < x'0f' -- !query 0 schema -struct<(X'00' < X'0F'):boolean> +struct<> -- !query 0 output -true +org.apache.spark.sql.catalyst.parser.ParseException + +Literals of type 'X' are currently not supported.(line 1, pos 7) + +== SQL == +select x'00' < x'0f' +-------^^^ -- !query 1 select x'00' < x'ff' -- !query 1 schema -struct<(X'00' < X'FF'):boolean> +struct<> -- !query 1 output -true +org.apache.spark.sql.catalyst.parser.ParseException + +Literals of type 'X' are currently not supported.(line 1, pos 7) + +== SQL == +select x'00' < x'ff' +-------^^^ From c40bfaf4f479c78719083ebbd8a8bf2738bf36e6 Mon Sep 17 00:00:00 2001 From: gatorsmile Date: Sat, 15 Jul 2017 17:27:10 -0700 Subject: [PATCH 2/2] fix. --- .../resources/sql-tests/inputs/comparator.sql | 4 ++-- .../sql-tests/results/comparator.sql.out | 24 +++++-------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/sql/core/src/test/resources/sql-tests/inputs/comparator.sql b/sql/core/src/test/resources/sql-tests/inputs/comparator.sql index 3e2447723e576..f6e6ded625852 100644 --- a/sql/core/src/test/resources/sql-tests/inputs/comparator.sql +++ b/sql/core/src/test/resources/sql-tests/inputs/comparator.sql @@ -1,3 +1,3 @@ -- binary type -select x'00' < x'0f'; -select x'00' < x'ff'; +select hex('00') < hex('0f'); +select hex('00') < hex('ff'); diff --git a/sql/core/src/test/resources/sql-tests/results/comparator.sql.out b/sql/core/src/test/resources/sql-tests/results/comparator.sql.out index 0706d8da432cc..1fe5542be410a 100644 --- a/sql/core/src/test/resources/sql-tests/results/comparator.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/comparator.sql.out @@ -3,28 +3,16 @@ -- !query 0 -select x'00' < x'0f' +select hex('00') < hex('0f') -- !query 0 schema -struct<> +struct<(hex(00) < hex(0f)):boolean> -- !query 0 output -org.apache.spark.sql.catalyst.parser.ParseException - -Literals of type 'X' are currently not supported.(line 1, pos 7) - -== SQL == -select x'00' < x'0f' --------^^^ +true -- !query 1 -select x'00' < x'ff' +select hex('00') < hex('ff') -- !query 1 schema -struct<> +struct<(hex(00) < hex(ff)):boolean> -- !query 1 output -org.apache.spark.sql.catalyst.parser.ParseException - -Literals of type 'X' are currently not supported.(line 1, pos 7) - -== SQL == -select x'00' < x'ff' --------^^^ +true