Github user vdiravka commented on a diff in the pull request:
https://github.com/apache/drill/pull/1047#discussion_r160419416
--- Diff: exec/vector/src/main/codegen/templates/BaseWriter.java ---
@@ -106,37 +114,37 @@
MapOrListWriter list(String name);
boolean isMapWriter();
boolean isListWriter();
- UInt1Writer uInt1(String name);
- UInt2Writer uInt2(String name);
- UInt4Writer uInt4(String name);
- UInt8Writer uInt8(String name);
- VarCharWriter varChar(String name);
- Var16CharWriter var16Char(String name);
- TinyIntWriter tinyInt(String name);
- SmallIntWriter smallInt(String name);
- IntWriter integer(String name);
- BigIntWriter bigInt(String name);
- Float4Writer float4(String name);
- Float8Writer float8(String name);
- BitWriter bit(String name);
- VarBinaryWriter varBinary(String name);
+ UInt1Writer uInt1(String name, TypeProtos.DataMode dataMode);
--- End diff --
> The mode passed here cannot be REPEATED: just won't work. So, can we pass
REQUIRED?
Yes, we can with my improvements - for OPTIONAL dataMode we will pass
Nullable Vectors and usual one for REQUIRED.
The proposed alternative is interesting, I will think how to implement it
in the best way. Maybe replacing SingleMapWriter with OptionalMapWriter and
RequredMapWriter could be done.
Note: here are some good code refactoring was done, so this PR shouldn't be
closed.
---