deniskuzZ commented on code in PR #4910:
URL: https://github.com/apache/hive/pull/4910#discussion_r1413579590


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java:
##########
@@ -218,13 +220,22 @@ public List<InputSplit> getSplits(JobContext context) {
       scan = applyConfig(conf, createTableScan(table, conf));
     }
 
+    boolean dataFilesWithinTableLocationOnly =
+        
conf.getBoolean(HiveConf.ConfVars.HIVE_ICEBERG_ALLOW_DATAFILES_IN_TABLE_LOCATION_ONLY.varname,
+            
HiveConf.ConfVars.HIVE_ICEBERG_ALLOW_DATAFILES_IN_TABLE_LOCATION_ONLY.defaultBoolVal);
+    Path tableLocation = new Path(conf.get(InputFormatConfig.TABLE_LOCATION));
+
+
     try (CloseableIterable<CombinedScanTask> tasksIterable = scan.planTasks()) 
{
       tasksIterable.forEach(task -> {
         if (applyResidual && (model == 
InputFormatConfig.InMemoryDataModel.HIVE ||
             model == InputFormatConfig.InMemoryDataModel.PIG)) {
           // TODO: We do not support residual evaluation for HIVE and PIG in 
memory data model yet
           checkResiduals(task);
         }
+        if (dataFilesWithinTableLocationOnly) {
+          validateFilesWithinTableDirectory(task, tableLocation);

Review Comment:
   could we rename it to `validateFilesLocation`? 



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