vvysotskyi commented on a change in pull request #2026: DRILL-7330: Implement 
metadata usage for all format plugins
URL: https://github.com/apache/drill/pull/2026#discussion_r392684132
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/scan/file/FileMetadataColumnDefn.java
 ##########
 @@ -53,7 +53,7 @@ public String toString() {
   public MajorType dataType() {
     return MajorType.newBuilder()
         .setMinorType(MinorType.VARCHAR)
-        .setMode(DataMode.REQUIRED)
+        .setMode(defn.isOptional() ? DataMode.OPTIONAL : DataMode.REQUIRED)
 
 Review comment:
   This is a per-file value and it is required for new implicit column required 
for collecting metadata. This column may have a null value if file is empty. It 
is already handled using the "missing columns" mechanism, but this change is 
required to point that column is nullable.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to