You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2020/01/02 17:37:10 UTC

[impala] 02/02: IMPALA-9272: Fix PlannerTest.testHdfs depending on year(now())

This is an automated email from the ASF dual-hosted git repository.

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit bb5000eec933e966e17a5cde6e1caf91a357bf0d
Author: stiga-huang <hu...@gmail.com>
AuthorDate: Thu Jan 2 15:35:22 2020 +0800

    IMPALA-9272: Fix PlannerTest.testHdfs depending on year(now())
    
    FE test PlannerTest.testHdfs depends on the result of year(now()) to be
    2019, which is wrong after we enter 2020. Replace it with another
    expression not depending on now().
    
    Change-Id: I7b3df560d69e40d3f2332ff242362bd36bbf6b64
    Reviewed-on: http://gerrit.cloudera.org:8080/14965
    Reviewed-by: Gabor Kaszab <ga...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 testdata/workloads/functional-planner/queries/PlannerTest/hdfs.test | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testdata/workloads/functional-planner/queries/PlannerTest/hdfs.test b/testdata/workloads/functional-planner/queries/PlannerTest/hdfs.test
index 5e7f685..a3d92f2 100644
--- a/testdata/workloads/functional-planner/queries/PlannerTest/hdfs.test
+++ b/testdata/workloads/functional-planner/queries/PlannerTest/hdfs.test
@@ -1189,7 +1189,7 @@ PLAN-ROOT SINK
 ====
 # Partition pruning when a binary predicate contains a constant expression (IMPALA-1636)
 select * from functional.alltypesagg t1
-where t1.day = instr("this is a test", "this") or t1.year = year(now()) + 100
+where t1.day = instr("this is a test", "this") or t1.year = cast(pi() as int) + 2116
 ---- PLAN
 PLAN-ROOT SINK
 |
@@ -1201,7 +1201,7 @@ PLAN-ROOT SINK
 # Partition pruning when there is a constant expression in the IN predicate values
 # (IMPALA-1636)
 select * from functional.alltypesagg t1
-where t1.day in (1, cast(2.0 as INT), year(now()) + 100)
+where t1.day in (1, cast(2.0 as INT), cast(pi() as int) + 2116)
 ---- PLAN
 PLAN-ROOT SINK
 |