diff options
author | Sorabh Hamirwasia <shamirwasia@maprtech.com> | 2018-03-07 12:06:32 -0800 |
---|---|---|
committer | Ben-Zvi <bben-zvi@mapr.com> | 2018-03-08 19:19:47 -0800 |
commit | b4a783a0b0fb334134fa00411cb4b910c05baa05 (patch) | |
tree | 461fba8e6e96ce43b17e86a2cb2798636335712a /exec/vector | |
parent | 766315ea17377199897d685ab801edd38394fe01 (diff) |
DRILL-6216: Metadata mismatch when connecting to a Drill 1.12.0 with a Drill-1.13.0-SNAPSHOT driver
closes #1157
Diffstat (limited to 'exec/vector')
-rw-r--r-- | exec/vector/src/main/codegen/templates/NullableValueVectors.java | 20 | ||||
-rw-r--r-- | exec/vector/src/main/java/org/apache/drill/exec/vector/ValueVector.java | 3 |
2 files changed, 9 insertions, 14 deletions
diff --git a/exec/vector/src/main/codegen/templates/NullableValueVectors.java b/exec/vector/src/main/codegen/templates/NullableValueVectors.java index bc13d62a2..8be5c8b86 100644 --- a/exec/vector/src/main/codegen/templates/NullableValueVectors.java +++ b/exec/vector/src/main/codegen/templates/NullableValueVectors.java @@ -67,25 +67,17 @@ public final class ${className} extends BaseDataValueVector implements <#if type private final UInt1Vector bits = new UInt1Vector(bitsField, allocator); - private final ${valuesName} values; + /** + * The values vector has same name as Nullable vector name, and has the same type and attributes + * as the nullable vector. This ensures that things like scale and precision are preserved in the values vector. + */ + private final ${valuesName} values = new ${minor.class}Vector(field, allocator); private final Mutator mutator = new Mutator(); - private final Accessor accessor; + private final Accessor accessor = new Accessor(); public ${className}(MaterializedField field, BufferAllocator allocator) { super(field, allocator); - - // The values vector has its own name, and has the same type and attributes - // as the nullable vector. This ensures that - // things like scale and precision are preserved in the values vector. - - values = new ${minor.class}Vector( - MaterializedField.create(VALUES_VECTOR_NAME, field.getType()), - allocator); - - field.addChild(bits.getField()); - field.addChild(values.getField()); - accessor = new Accessor(); } @Override diff --git a/exec/vector/src/main/java/org/apache/drill/exec/vector/ValueVector.java b/exec/vector/src/main/java/org/apache/drill/exec/vector/ValueVector.java index 58ed57b32..f873cc66b 100644 --- a/exec/vector/src/main/java/org/apache/drill/exec/vector/ValueVector.java +++ b/exec/vector/src/main/java/org/apache/drill/exec/vector/ValueVector.java @@ -90,6 +90,9 @@ public interface ValueVector extends Closeable, Iterable<ValueVector> { String BITS_VECTOR_NAME = "$bits$"; String OFFSETS_VECTOR_NAME = "$offsets$"; + + @Deprecated + // See DRILL-6216 String VALUES_VECTOR_NAME = "$values$"; /** |