difin commented on code in PR #6716:
URL: https://github.com/apache/hive/pull/6716#discussion_r4040762274


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/stats/IcebergColStatsReader.java:
##########
@@ -176,11 +190,25 @@ private static boolean fetchVectors(Configuration conf) {
     return MetastoreConf.getBoolVar(conf, 
MetastoreConf.ConfVars.STATS_FETCH_BITVECTOR);
   }
 
-  /** The blobs naming any of the asked columns, by the name the table's 
schema gives the field now. */
-  private static Predicate<BlobMetadata> blobsForColumns(Table table, 
Collection<String> columns) {
-    return metadata -> metadata.inputFields().stream()
-        .map(fieldId -> table.schema().findColumnName(fieldId))
-        .anyMatch(columns::contains);
+  /**
+   * The fields the needed columns are, by the name the schema gives each now; 
a null column set
+   * asks for all of them. A field the schema no longer has is none of them: 
the name its entry
+   * was stored under may since have moved to another column.
+   */
+  static IntPredicate neededFields(Schema schema, Collection<String> columns) {

Review Comment:
   The method name is not very clear to me (needed for what?)



-- 
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