[
https://issues.apache.org/jira/browse/DRILL-6223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420106#comment-16420106
]
ASF GitHub Bot commented on DRILL-6223:
---------------------------------------
Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/1170#discussion_r178225725
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorContainer.java
---
@@ -136,14 +138,28 @@ public void transferOut(VectorContainer containerOut)
{
public <T extends ValueVector> T addOrGet(final MaterializedField field,
final SchemaChangeCallBack callBack) {
final TypedFieldId id =
getValueVectorId(SchemaPath.getSimplePath(field.getName()));
final ValueVector vector;
- final Class<?> clazz =
TypeHelper.getValueVectorClass(field.getType().getMinorType(),
field.getType().getMode());
+
if (id != null) {
- vector = getValueAccessorById(id.getFieldIds()).getValueVector();
+ vector =
getValueAccessorById(id.getFieldIds()).getValueVector();
+ final Class<?> clazz =
TypeHelper.getValueVectorClass(field.getType().getMinorType(),
field.getType().getMode());
+
+ // Check whether incoming field and the current one are compatible;
if not then replace previous one with the new one
if (id.getFieldIds().length == 1 && clazz != null &&
!clazz.isAssignableFrom(vector.getClass())) {
final ValueVector newVector = TypeHelper.getNewVector(field,
this.getAllocator(), callBack);
replace(vector, newVector);
return (T) newVector;
}
+
+ // At this point, we know incoming and current fields are
compatible. Maps can have children,
+ // we need to ensure they have the same structure.
+ if (MinorType.MAP.equals(field.getType().getMinorType())
--- End diff --
This is tricky and probably broken elsewhere. If the incoming type is a
union or a list, then it can contain a nested map.
> Drill fails on Schema changes
> ------------------------------
>
> Key: DRILL-6223
> URL: https://issues.apache.org/jira/browse/DRILL-6223
> Project: Apache Drill
> Issue Type: Improvement
> Components: Execution - Relational Operators
> Affects Versions: 1.10.0, 1.12.0
> Reporter: salim achouche
> Assignee: salim achouche
> Priority: Major
> Fix For: 1.14.0
>
>
> Drill Query Failing when selecting all columns from a Complex Nested Data
> File (Parquet) Set). There are differences in Schema among the files:
> * The Parquet files exhibit differences both at the first level and within
> nested data types
> * A select * will not cause an exception but using a limit clause will
> * Note also this issue seems to happen only when multiple Drillbit minor
> fragments are involved (concurrency higher than one)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)