Repository: drill
Updated Branches:
  refs/heads/master 71608ca9f -> 245da9790


DRILL-4501: Complete MapOrListWriter for all supported data types

Closes #427


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/245da979
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/245da979
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/245da979

Branch: refs/heads/master
Commit: 245da9790813569c5da9404e0fc5e45cc88e22bb
Parents: 71608ca
Author: Aditya Kishore <a...@apache.org>
Authored: Sat Mar 12 11:12:34 2016 -0800
Committer: Aditya Kishore <a...@apache.org>
Committed: Wed Mar 16 10:25:48 2016 -0700

----------------------------------------------------------------------
 .../src/main/codegen/templates/BaseWriter.java  |  25 ++++
 .../complex/impl/MapOrListWriterImpl.java       | 125 ++++++++++++++++++-
 2 files changed, 149 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/245da979/exec/vector/src/main/codegen/templates/BaseWriter.java
----------------------------------------------------------------------
diff --git a/exec/vector/src/main/codegen/templates/BaseWriter.java 
b/exec/vector/src/main/codegen/templates/BaseWriter.java
index 9ca72c2..f2c6e22 100644
--- a/exec/vector/src/main/codegen/templates/BaseWriter.java
+++ b/exec/vector/src/main/codegen/templates/BaseWriter.java
@@ -106,12 +106,37 @@ package org.apache.drill.exec.vector.complex.writer;
     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);
+    /**
+     * @deprecated Use {@link #varBinary(String)} instead.
+     */
+    @Deprecated
     VarBinaryWriter binary(String name);
+    DateWriter date(String name);
+    TimeWriter time(String name);
+    TimeStampWriter timeStamp(String name);
+    IntervalYearWriter intervalYear(String name);
+    IntervalDayWriter intervalDay(String name);
+    IntervalWriter interval(String name);
+    Decimal9Writer decimal9(String name);
+    Decimal18Writer decimal18(String name);
+    Decimal28DenseWriter decimal28Dense(String name);
+    Decimal38DenseWriter decimal38Dense(String name);
+    Decimal38SparseWriter decimal38Sparse(String name);
+    Decimal28SparseWriter decimal28Sparse(String name);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/245da979/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
----------------------------------------------------------------------
diff --git 
a/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
 
b/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
index 1cfcdab..302d99e 100644
--- 
a/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
+++ 
b/exec/vector/src/main/java/org/apache/drill/exec/vector/complex/impl/MapOrListWriterImpl.java
@@ -17,13 +17,32 @@
  */
 package org.apache.drill.exec.vector.complex.impl;
 
-import org.apache.drill.exec.vector.complex.writer.BaseWriter.MapOrListWriter;
 import org.apache.drill.exec.vector.complex.writer.BaseWriter;
+import org.apache.drill.exec.vector.complex.writer.BaseWriter.MapOrListWriter;
 import org.apache.drill.exec.vector.complex.writer.BigIntWriter;
 import org.apache.drill.exec.vector.complex.writer.BitWriter;
+import org.apache.drill.exec.vector.complex.writer.DateWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal18Writer;
+import org.apache.drill.exec.vector.complex.writer.Decimal28DenseWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal28SparseWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal38DenseWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal38SparseWriter;
+import org.apache.drill.exec.vector.complex.writer.Decimal9Writer;
 import org.apache.drill.exec.vector.complex.writer.Float4Writer;
 import org.apache.drill.exec.vector.complex.writer.Float8Writer;
 import org.apache.drill.exec.vector.complex.writer.IntWriter;
+import org.apache.drill.exec.vector.complex.writer.IntervalDayWriter;
+import org.apache.drill.exec.vector.complex.writer.IntervalWriter;
+import org.apache.drill.exec.vector.complex.writer.IntervalYearWriter;
+import org.apache.drill.exec.vector.complex.writer.SmallIntWriter;
+import org.apache.drill.exec.vector.complex.writer.TimeStampWriter;
+import org.apache.drill.exec.vector.complex.writer.TimeWriter;
+import org.apache.drill.exec.vector.complex.writer.TinyIntWriter;
+import org.apache.drill.exec.vector.complex.writer.UInt1Writer;
+import org.apache.drill.exec.vector.complex.writer.UInt2Writer;
+import org.apache.drill.exec.vector.complex.writer.UInt4Writer;
+import org.apache.drill.exec.vector.complex.writer.UInt8Writer;
+import org.apache.drill.exec.vector.complex.writer.Var16CharWriter;
 import org.apache.drill.exec.vector.complex.writer.VarBinaryWriter;
 import org.apache.drill.exec.vector.complex.writer.VarCharWriter;
 
@@ -105,8 +124,112 @@ public class MapOrListWriterImpl implements 
MapOrListWriter {
     return (map != null) ? map.bit(name) : list.bit();
   }
 
+  /**
+   * {@inheritDoc}
+   */
+  @Deprecated
   public VarBinaryWriter binary(final String name) {
     return (map != null) ? map.varBinary(name) : list.varBinary();
   }
 
+  @Override
+  public TinyIntWriter tinyInt(String name) {
+    return (map != null) ? map.tinyInt(name) : list.tinyInt();
+  }
+
+  @Override
+  public SmallIntWriter smallInt(String name) {
+    return (map != null) ? map.smallInt(name) : list.smallInt();
+  }
+
+  @Override
+  public DateWriter date(String name) {
+    return (map != null) ? map.date(name) : list.date();
+  }
+
+  @Override
+  public TimeWriter time(String name) {
+    return (map != null) ? map.time(name) : list.time();
+  }
+
+  @Override
+  public TimeStampWriter timeStamp(String name) {
+    return (map != null) ? map.timeStamp(name) : list.timeStamp();
+  }
+
+  @Override
+  public VarBinaryWriter varBinary(String name) {
+    return (map != null) ? map.varBinary(name) : list.varBinary();
+  }
+
+  @Override
+  public Var16CharWriter var16Char(String name) {
+    return (map != null) ? map.var16Char(name) : list.var16Char();
+  }
+
+  @Override
+  public UInt1Writer uInt1(String name) {
+    return (map != null) ? map.uInt1(name) : list.uInt1();
+  }
+
+  @Override
+  public UInt2Writer uInt2(String name) {
+    return (map != null) ? map.uInt2(name) : list.uInt2();
+  }
+
+  @Override
+  public UInt4Writer uInt4(String name) {
+    return (map != null) ? map.uInt4(name) : list.uInt4();
+  }
+
+  @Override
+  public UInt8Writer uInt8(String name) {
+    return (map != null) ? map.uInt8(name) : list.uInt8();
+  }
+
+  @Override
+  public IntervalYearWriter intervalYear(String name) {
+    return (map != null) ? map.intervalYear(name) : list.intervalYear();
+  }
+
+  @Override
+  public IntervalDayWriter intervalDay(String name) {
+    return (map != null) ? map.intervalDay(name) : list.intervalDay();
+  }
+
+  @Override
+  public IntervalWriter interval(String name) {
+    return (map != null) ? map.interval(name) : list.interval();
+  }
+
+  @Override
+  public Decimal9Writer decimal9(String name) {
+    return (map != null) ? map.decimal9(name) : list.decimal9();
+  }
+
+  @Override
+  public Decimal18Writer decimal18(String name) {
+    return (map != null) ? map.decimal18(name) : list.decimal18();
+  }
+
+  @Override
+  public Decimal28DenseWriter decimal28Dense(String name) {
+    return (map != null) ? map.decimal28Dense(name) : list.decimal28Dense();
+  }
+
+  @Override
+  public Decimal38DenseWriter decimal38Dense(String name) {
+    return (map != null) ? map.decimal38Dense(name) : list.decimal38Dense();
+  }
+
+  @Override
+  public Decimal38SparseWriter decimal38Sparse(String name) {
+    return (map != null) ? map.decimal38Sparse(name) : list.decimal38Sparse();
+  }
+
+  @Override
+  public Decimal28SparseWriter decimal28Sparse(String name) {
+    return (map != null) ? map.decimal28Sparse(name) : list.decimal28Sparse();
+  }
+
 }

Reply via email to