ihuzenko commented on a change in pull request #1829: DRILL-7096: Develop 
vector for canonical Map<K,V>
URL: https://github.com/apache/drill/pull/1829#discussion_r318145011
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet2/DrillParquetReader.java
 ##########
 @@ -123,14 +126,22 @@ private static MessageType getProjection(MessageType 
schema,
     Set<SchemaPath> selectedSchemaPaths = new LinkedHashSet<>();
 
     // get a list of modified columns which have the array elements removed 
from the schema path since parquet schema doesn't include array elements
+    // or if field is MAP then array/name segments are removed from the schema 
as well as obtaining elements by key is handled in EvaluationVisitor.
     List<SchemaPath> modifiedColumns = new LinkedList<>();
     for (SchemaPath path : columns) {
 
       List<String> segments = new ArrayList<>();
+      Type segmentType = schema;
       for (PathSegment seg = path.getRootSegment(); seg != null; seg = 
seg.getChild()) {
+
+        segmentType = getType(segmentType, seg);
 
 Review comment:
   Please move down this and next line to be just before the ```if (isMap) {``` 
also add one line comment inside ```if``` describing why ```break;``` was 
called. 

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