scarlin-cloudera commented on code in PR #3179:
URL: https://github.com/apache/hive/pull/3179#discussion_r848794055


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/UnparseTranslatorHelper.java:
##########
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.ql.parse;
+
+import org.apache.calcite.rex.RexInputRef;
+import org.apache.calcite.rex.RexNode;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.ql.exec.ColumnInfo;
+import org.apache.hadoop.hive.ql.metadata.HiveUtils;
+
+/**
+ * Class containing static methods that help populate the UnparseTranslator.
+ */
+public class UnparseTranslatorHelper {
+
+  /**
+   * Adds translation to the unparseTranslator for the RexNode if it is a 
RexInputRef.
+   * Grabs the inputRef information from the given RowResolver.
+   */
+  public static void addTranslationIfNeeded(ASTNode astNode, RexNode rexNode, 
RowResolver rr,

Review Comment:
   I have mixed feelings about this.
   
   I don't particularly like making UnparseTranslator dependent on some of 
these other classes. I suppose RexNode and ASTNode do not matter too much since 
they will always be dependencies but i'm not thrilled about adding a dependency 
to RowResolver.
   
   Having said that, they are in the same package right now and it will be easy 
enough to separate them, so I don't mind doing what you propose.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to