deniskuzZ commented on code in PR #6600:
URL: https://github.com/apache/hive/pull/6600#discussion_r3658053043
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java:
##########
@@ -836,17 +838,14 @@ public Void visitInputRef(RexInputRef inputRef) {
return deterministicFuncWithSingleInputRef;
}
- public static <T> ImmutableMap<Integer, T> getColInfoMap(List<T> hiveCols,
- int startIndx) {
- Builder<Integer, T> bldr = ImmutableMap.<Integer, T> builder();
+ public static ImmutableMap<Integer, ColumnInfo>
getColInfoMap(List<ColumnInfo> hiveCols, Table table) {
Review Comment:
how about
````
public static ImmutableMap<Integer, ColumnInfo> getColInfoMap(
List<ColumnInfo> hiveCols, ToIntFunction<String> indexByName) {
return Maps.uniqueIndex(hiveCols, ci ->
indexByName.applyAsInt(ci.getInternalName()));
}
````
and then
````
this.hiveNonPartitionColsMap =
HiveCalciteUtil.getColInfoMap(hiveNonPartitionCols,
hiveTblMetadata::getColumnIndexByName);
````
--
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]