[ https://issues.apache.org/jira/browse/HIVE-26117?focusedWorklogId=755982&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-755982 ]
ASF GitHub Bot logged work on HIVE-26117: ----------------------------------------- Author: ASF GitHub Bot Created on: 12/Apr/22 19:23 Start Date: 12/Apr/22 19:23 Worklog Time Spent: 10m Work Description: 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. Issue Time Tracking ------------------- Worklog Id: (was: 755982) Time Spent: 1h (was: 50m) > Remove 2 superfluous lines of code in genJoinRelNode > ---------------------------------------------------- > > Key: HIVE-26117 > URL: https://issues.apache.org/jira/browse/HIVE-26117 > Project: Hive > Issue Type: Bug > Components: CBO > Reporter: Steve Carlin > Assignee: Steve Carlin > Priority: Minor > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > The code was rewritten to associate ASTNodes to RexNodes. Some code was left > behind that doesn't add any value. -- This message was sent by Atlassian Jira (v8.20.1#820001)