Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13114 )

Change subject: IMPALA-7140 (part 7): small fixes to enable most queries on 
HDFS tables
......................................................................


Patch Set 1:

The conflicts are in 
fe/src/main/java/org/apache/impala/analysis/FunctionName.java:

 88   public void analyze(Analyzer analyzer) throws AnalysisException {
 89     if (isAnalyzed_) return;
 90     analyzeFnNamePath();
 91     if (fn_.isEmpty()) throw new AnalysisException("Function name cannot be 
empty.");
 92     for (int i = 0; i < fn_.length(); ++i) {
 93       if (!isValidCharacter(fn_.charAt(i))) {
 94         throw new AnalysisException(
 95             "Function names must be all alphanumeric or underscore. " +
 96             "Invalid name: " + fn_);
 97       }
 98     }
 99     if (Character.isDigit(fn_.charAt(0))) {
100       throw new AnalysisException("Function cannot start with a digit: " + 
fn_);
101     }
102
103     // Resolve the database for this function.
104 <<<<<<< HEAD
105     if (!isFullyQualified()) {
106       Db builtinDb = ImpaladCatalog.getBuiltinsDb();
107       if (builtinDb.containsFunction(fn_)) {
108         // If it isn't fully qualified and is the same name as a builtin, 
use
109         // the builtin.
110         db_ = ImpaladCatalog.BUILTINS_DB;
111         isBuiltin_ = true;
112       } else {
113         db_ = analyzer.getDefaultDb();
114         isBuiltin_ = false;
115 =======
116     Db builtinDb = BuiltinsDb.getInstance();
117     if (!isFullyQualified()) {
118       db_ = analyzer.getDefaultDb();
119       if (preferBuiltinsDb && builtinDb.containsFunction(fn_)) {
120         db_ = BuiltinsDb.NAME;
121 >>>>>>> 7f8a4d3... IMPALA-7140 (part 7): small fixes to enable most queries 
on HDFS tables
122       }
123     } else {
124       isBuiltin_ = db_.equals(ImpaladCatalog.BUILTINS_DB);
125     }
126 <<<<<<< HEAD
127 =======
128     Preconditions.checkNotNull(db_);
129     isBuiltin_ = db_.equals(BuiltinsDb.NAME) &&
130         builtinDb.containsFunction(fn_);
131 >>>>>>> 7f8a4d3... IMPALA-7140 (part 7): small fixes to enable most queries 
on HDFS tables
132     isAnalyzed_ = true;
133   }

The cause is that in the master branch, this function is modified by 
IMPALA-6724: 
https://github.com/apache/impala/commit/08d386f0fc62e2991bcc046dde8574f25d421580
This patch is skipped for 2.x.

To resolve the conflicts, we keep everything of HEAD excerpts changing 
ImpaladCatalog.getBuiltinsDb() to BuiltinsDb.getInstance() and changing 
ImpaladCatalog.BUILTINS_DB to BuiltinsDb.NAME.

Besides, we also need to do this in 
fe/src/main/java/org/apache/impala/analysis/CreateFunctionStmtBase.java:[152,23]
 since these lines were removed in the master branch too.


--
To view, visit http://gerrit.cloudera.org:8080/13114
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: 2.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I6f603e62b7a013c148c0905ebdec2f4303f9c4e5
Gerrit-Change-Number: 13114
Gerrit-PatchSet: 1
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Thu, 25 Apr 2019 07:25:28 +0000
Gerrit-HasComments: No

Reply via email to