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_r392683321
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/scan/file/FileMetadataColumn.java
##########
@@ -65,6 +82,11 @@ public FileMetadataColumn(String name,
FileMetadataColumnDefn defn) {
@Override
public MetadataColumn resolve(FileMetadata fileInfo, VectorSource source,
int sourceIndex) {
- return new FileMetadataColumn(name(), defn, fileInfo, source, sourceIndex);
+ if (value() == null) {
+ return new FileMetadataColumn(name(), defn, fileInfo, source,
sourceIndex);
+ } else {
+ // case of metadata column, which should have null value independently
of its column definition
+ return new FileMetadataColumn(name(), defn, (String) null, source,
sourceIndex);
Review comment:
This change is required only for the case when we need to enforce the value
of the implicit column to `null` before it is written to the vector.
I have reworked changes in the `ReaderSchemaOrchestrator`, so this one is
not required anymore.
----------------------------------------------------------------
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