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 2023/08/23 00:58:06 UTC

[impala] branch master updated: IMPALA-12384: Restore NullLiteral's uncheckedCastTo function signature

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


The following commit(s) were added to refs/heads/master by this push:
     new 08501cef2 IMPALA-12384: Restore NullLiteral's uncheckedCastTo function signature
08501cef2 is described below

commit 08501cef2df16991bbd99656c696b978f08aeebe
Author: Peter Rozsa <pr...@cloudera.com>
AuthorDate: Fri Aug 18 10:32:29 2023 +0200

    IMPALA-12384: Restore NullLiteral's uncheckedCastTo function signature
    
    This change restores NullLiteral's uncheckedCastTo function's signature
    to preserve the external compatibility of the method and make it conform
    with changes regarding IMPALA-10173.
    
    Change-Id: Id9c01129d3cdcaeb222ea910521704ce2305fd2e
    Reviewed-on: http://gerrit.cloudera.org:8080/20376
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 fe/src/main/java/org/apache/impala/analysis/NullLiteral.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/fe/src/main/java/org/apache/impala/analysis/NullLiteral.java b/fe/src/main/java/org/apache/impala/analysis/NullLiteral.java
index 1a493d52a..5ac037fa9 100644
--- a/fe/src/main/java/org/apache/impala/analysis/NullLiteral.java
+++ b/fe/src/main/java/org/apache/impala/analysis/NullLiteral.java
@@ -19,6 +19,7 @@ package org.apache.impala.analysis;
 
 import org.apache.impala.catalog.Type;
 import org.apache.impala.catalog.TypeCompatibility;
+import org.apache.impala.common.AnalysisException;
 import org.apache.impala.thrift.TExprNode;
 import org.apache.impala.thrift.TExprNodeType;
 
@@ -45,7 +46,7 @@ public class NullLiteral extends LiteralExpr {
   public static NullLiteral create(Type type) {
     NullLiteral l = new NullLiteral();
     l.analyzeNoThrow(null);
-    l.uncheckedCastTo(type, TypeCompatibility.DEFAULT);
+    l.uncheckedCastTo(type);
     return l;
   }
 
@@ -66,12 +67,17 @@ public class NullLiteral extends LiteralExpr {
   public String getStringValue() { return "NULL"; }
 
   @Override
-  protected Expr uncheckedCastTo(Type targetType, TypeCompatibility compatibility) {
+  protected Expr uncheckedCastTo(Type targetType) {
     Preconditions.checkState(targetType.isValid());
     type_ = targetType;
     return this;
   }
 
+  @Override
+  protected Expr uncheckedCastTo(Type targetType, TypeCompatibility compatibility) {
+    return uncheckedCastTo(targetType);
+  }
+
   @Override
   protected void toThrift(TExprNode msg) {
     msg.node_type = TExprNodeType.NULL_LITERAL;