diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java b/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java index a71fb81..e692ec5 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java @@ -145,7 +145,7 @@ public String toString() { } else if (literalList != null) { for(Object lit: literalList) { buffer.append(' '); - buffer.append(lit.toString()); + buffer.append(lit); } } buffer.append(')'); diff --git a/ql/src/test/queries/clientpositive/orc_ppd_timestamp.q b/ql/src/test/queries/clientpositive/orc_ppd_timestamp.q index dafd6cf..90fba62 100644 --- a/ql/src/test/queries/clientpositive/orc_ppd_timestamp.q +++ b/ql/src/test/queries/clientpositive/orc_ppd_timestamp.q @@ -95,3 +95,9 @@ select sum(hash(*)) from newtypesorc where ts between cast('2010-10-01 01:01:01' set hive.optimize.index.filter=true; select sum(hash(*)) from newtypesorc where ts between cast('2010-10-01 01:01:01' as timestamp) and cast('2010-11-01 01:01:01' as timestamp); + +set hive.optimize.index.filter=false; +select sum(hash(*)) from newtypesorc where ts between cast('2010-10-01' as timestamp) and cast('2010-11-01' as timestamp); + +set hive.optimize.index.filter=true; +select sum(hash(*)) from newtypesorc where ts between cast('2010-10-01' as timestamp) and cast('2010-11-01' as timestamp); diff --git a/ql/src/test/results/clientpositive/orc_ppd_timestamp.q.out b/ql/src/test/results/clientpositive/orc_ppd_timestamp.q.out index f1030a9..ea5c85b 100644 --- a/ql/src/test/results/clientpositive/orc_ppd_timestamp.q.out +++ b/ql/src/test/results/clientpositive/orc_ppd_timestamp.q.out @@ -290,3 +290,21 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@newtypesorc #### A masked pattern was here #### NULL +PREHOOK: query: select sum(hash(*)) from newtypesorc where ts between cast('2010-10-01' as timestamp) and cast('2010-11-01' as timestamp) +PREHOOK: type: QUERY +PREHOOK: Input: default@newtypesorc +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(*)) from newtypesorc where ts between cast('2010-10-01' as timestamp) and cast('2010-11-01' as timestamp) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@newtypesorc +#### A masked pattern was here #### +NULL +PREHOOK: query: select sum(hash(*)) from newtypesorc where ts between cast('2010-10-01' as timestamp) and cast('2010-11-01' as timestamp) +PREHOOK: type: QUERY +PREHOOK: Input: default@newtypesorc +#### A masked pattern was here #### +POSTHOOK: query: select sum(hash(*)) from newtypesorc where ts between cast('2010-10-01' as timestamp) and cast('2010-11-01' as timestamp) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@newtypesorc +#### A masked pattern was here #### +NULL