You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2015/10/08 18:44:47 UTC

[3/5] incubator-asterixdb git commit: Move ADM-specific printers and related classes into .adm packages.

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryBase64Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryBase64Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryBase64Printer.java
new file mode 100644
index 0000000..fd1d595
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryBase64Printer.java
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.ABinarySerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+import java.io.IOException;
+import java.io.PrintStream;
+
+public class ABinaryBase64Printer implements IPrinter {
+    private ABinaryBase64Printer() {
+    }
+
+    public static final ABinaryBase64Printer INSTANCE = new ABinaryBase64Printer();
+
+    @Override public void init() throws AlgebricksException {
+
+    }
+
+    @Override public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        int validLength = ABinarySerializerDeserializer.getLength(b, s + 1);
+        int start = s + 1 + ABinarySerializerDeserializer.SIZE_OF_LENGTH;
+        try {
+            ps.print("base64(\"");
+            printBase64Binary(b, start, validLength, ps);
+            ps.print("\")");
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+
+    /**
+     * Encodes a byte array into a {@code Appendable} stream by doing base64 encoding.
+     *
+     * @return the same stream in purpose of chained process.
+     */
+    public static Appendable printBase64Binary(byte[] input, int offset, int len, Appendable appendable)
+            throws IOException {
+        // encode elements until only 1 or 2 elements are left to encode
+        int remaining = len;
+        int i;
+        for (i = offset; remaining >= 3; remaining -= 3, i += 3) {
+            appendable.append(encode(input[i] >> 2));
+            appendable.append(encode(
+                    ((input[i] & 0x3) << 4)
+                            | ((input[i + 1] >> 4) & 0xF)));
+            appendable.append(encode(
+                    ((input[i + 1] & 0xF) << 2)
+                            | ((input[i + 2] >> 6) & 0x3)));
+            appendable.append(encode(input[i + 2] & 0x3F));
+        }
+        // encode when exactly 1 element (left) to encode
+        if (remaining == 1) {
+            appendable.append(encode(input[i] >> 2));
+            appendable.append(encode(((input[i]) & 0x3) << 4));
+            appendable.append('=');
+            appendable.append('=');
+        }
+        // encode when exactly 2 elements (left) to encode
+        if (remaining == 2) {
+            appendable.append(encode(input[i] >> 2));
+            appendable.append(encode(((input[i] & 0x3) << 4)
+                    | ((input[i + 1] >> 4) & 0xF)));
+            appendable.append(encode((input[i + 1] & 0xF) << 2));
+            appendable.append('=');
+        }
+        return appendable;
+    }
+
+    /**
+     * Encodes a byte array into a char array by doing base64 encoding.
+     * The caller must supply a big enough buffer.
+     *
+     * @return the value of {@code ptr+((len+2)/3)*4}, which is the new offset
+     * in the output buffer where the further bytes should be placed.
+     */
+    public static int printBase64Binary(byte[] input, int offset, int len, char[] buf, int ptr) {
+        // encode elements until only 1 or 2 elements are left to encode
+        int remaining = len;
+        int i;
+        for (i = offset; remaining >= 3; remaining -= 3, i += 3) {
+            buf[ptr++] = encode(input[i] >> 2);
+            buf[ptr++] = encode(
+                    ((input[i] & 0x3) << 4)
+                            | ((input[i + 1] >> 4) & 0xF));
+            buf[ptr++] = encode(
+                    ((input[i + 1] & 0xF) << 2)
+                            | ((input[i + 2] >> 6) & 0x3));
+            buf[ptr++] = encode(input[i + 2] & 0x3F);
+        }
+        // encode when exactly 1 element (left) to encode
+        if (remaining == 1) {
+            buf[ptr++] = encode(input[i] >> 2);
+            buf[ptr++] = encode(((input[i]) & 0x3) << 4);
+            buf[ptr++] = '=';
+            buf[ptr++] = '=';
+        }
+        // encode when exactly 2 elements (left) to encode
+        if (remaining == 2) {
+            buf[ptr++] = encode(input[i] >> 2);
+            buf[ptr++] = encode(((input[i] & 0x3) << 4)
+                    | ((input[i + 1] >> 4) & 0xF));
+            buf[ptr++] = encode((input[i + 1] & 0xF) << 2);
+            buf[ptr++] = '=';
+        }
+        return ptr;
+    }
+
+    private static final char[] encodeMap = initEncodeMap();
+
+    private static char[] initEncodeMap() {
+        char[] map = new char[64];
+        int i;
+        for (i = 0; i < 26; i++) {
+            map[i] = (char) ('A' + i);
+        }
+        for (i = 26; i < 52; i++) {
+            map[i] = (char) ('a' + (i - 26));
+        }
+        for (i = 52; i < 62; i++) {
+            map[i] = (char) ('0' + (i - 52));
+        }
+        map[62] = '+';
+        map[63] = '/';
+
+        return map;
+    }
+
+    public static char encode(int i) {
+        return encodeMap[i & 0x3F];
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryHexPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryHexPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryHexPrinter.java
new file mode 100644
index 0000000..d21a17d
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryHexPrinter.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.ABinarySerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+import java.io.IOException;
+import java.io.PrintStream;
+
+public class ABinaryHexPrinter implements IPrinter {
+    private ABinaryHexPrinter() {
+    }
+
+    public static final ABinaryHexPrinter INSTANCE = new ABinaryHexPrinter();
+
+    @Override public void init() throws AlgebricksException {
+
+    }
+
+    @Override public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        int validLength = ABinarySerializerDeserializer.getLength(b, s + 1);
+        int start = s + 1 + ABinarySerializerDeserializer.SIZE_OF_LENGTH;
+        try {
+            ps.print("hex(\"");
+            printHexString(b, start, validLength, ps);
+            ps.print("\")");
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+
+    public static Appendable printHexString(byte[] bytes, int start, int length, Appendable appendable)
+            throws IOException {
+        for (int i = 0; i < length; ++i) {
+            appendable.append((char) PrintTools.hex((bytes[start + i] >>> 4) & 0x0f, PrintTools.CASE.UPPER_CASE));
+            appendable.append((char) PrintTools.hex((bytes[start + i] & 0x0f), PrintTools.CASE.UPPER_CASE));
+        }
+        return appendable;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryPrinterFactory.java
new file mode 100644
index 0000000..1379154
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABinaryPrinterFactory.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ABinaryPrinterFactory implements IPrinterFactory {
+
+    private ABinaryPrinterFactory() {
+    }
+
+    public static final ABinaryPrinterFactory INSTANCE = new ABinaryPrinterFactory();
+
+    @Override public IPrinter createPrinter() {
+        return ABinaryHexPrinter.INSTANCE;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABooleanPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABooleanPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABooleanPrinter.java
new file mode 100644
index 0000000..10c2717
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABooleanPrinter.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.ABooleanSerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class ABooleanPrinter implements IPrinter {
+
+    public static final ABooleanPrinter INSTANCE = new ABooleanPrinter();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print(ABooleanSerializerDeserializer.getBoolean(b, s + 1));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABooleanPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABooleanPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABooleanPrinterFactory.java
new file mode 100644
index 0000000..f29fcd4
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ABooleanPrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ABooleanPrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ABooleanPrinterFactory INSTANCE = new ABooleanPrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ABooleanPrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ACirclePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ACirclePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ACirclePrinter.java
new file mode 100644
index 0000000..ff30c0a
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ACirclePrinter.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class ACirclePrinter implements IPrinter {
+
+    public static final ACirclePrinter INSTANCE = new ACirclePrinter();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print("circle(\"");
+        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
+        ps.print(",");
+        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 9));
+        ps.print(" ");
+        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 17));
+        ps.print("\")");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ACirclePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ACirclePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ACirclePrinterFactory.java
new file mode 100644
index 0000000..b15f11c
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ACirclePrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ACirclePrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ACirclePrinterFactory INSTANCE = new ACirclePrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ACirclePrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinter.java
new file mode 100644
index 0000000..c1f952e
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinter.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
+import org.apache.asterix.om.base.temporal.GregorianCalendarSystem.Fields;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class ADatePrinter implements IPrinter {
+
+    private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
+    public static final ADatePrinter INSTANCE = new ADatePrinter();
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print("date(\"");
+        printString(b, s, l, ps);
+        ps.print("\")");
+    }
+
+    public void printString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        long chrononTime = AInt32SerializerDeserializer.getInt(b, s + 1) * CHRONON_OF_DAY;
+
+        try {
+            gCalInstance.getExtendStringRepUntilField(chrononTime, 0, ps, Fields.YEAR, Fields.DAY, false);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinterFactory.java
new file mode 100644
index 0000000..8c40fa8
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADatePrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ADatePrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ADatePrinterFactory INSTANCE = new ADatePrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ADatePrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinter.java
new file mode 100644
index 0000000..b3f60e2
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinter.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
+import org.apache.asterix.om.base.temporal.GregorianCalendarSystem.Fields;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class ADateTimePrinter implements IPrinter {
+
+    public static final ADateTimePrinter INSTANCE = new ADateTimePrinter();
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print("datetime(\"");
+        printString(b, s, l, ps);
+        ps.print("\")");
+    }
+
+    public void printString(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        long chrononTime = AInt64SerializerDeserializer.getLong(b, s + 1);
+
+        try {
+            gCalInstance.getExtendStringRepUntilField(chrononTime, 0, ps, Fields.YEAR, Fields.MILLISECOND, true);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinterFactory.java
new file mode 100644
index 0000000..de44bf9
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADateTimePrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ADateTimePrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ADateTimePrinterFactory INSTANCE = new ADateTimePrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ADateTimePrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinter.java
new file mode 100644
index 0000000..59da5d5
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinter.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
+
+public class ADayTimeDurationPrinter implements IPrinter {
+
+    public static final ADayTimeDurationPrinter INSTANCE = new ADayTimeDurationPrinter();
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
+
+    @Override
+    public void init() throws AlgebricksException {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        boolean positive = true;
+        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 1);
+
+        // set the negative flag. "||" is necessary in case that months field is not there (so it is 0)
+        if (milliseconds < 0) {
+            milliseconds *= -1;
+            positive = false;
+        }
+
+        int millisecond = gCalInstance.getDurationMillisecond(milliseconds);
+        int second = gCalInstance.getDurationSecond(milliseconds);
+        int minute = gCalInstance.getDurationMinute(milliseconds);
+        int hour = gCalInstance.getDurationHour(milliseconds);
+        int day = gCalInstance.getDurationDay(milliseconds);
+
+        ps.print("day-time-duration(\"");
+        if (!positive) {
+            ps.print("-");
+        }
+        try {
+            ps.print("P");
+            if (day != 0) {
+                WriteValueTools.writeInt(day, ps);
+                ps.print("D");
+            }
+            if (hour != 0 || minute != 0 || second != 0 || millisecond != 0) {
+                ps.print("T");
+            }
+            if (hour != 0) {
+                WriteValueTools.writeInt(hour, ps);
+                ps.print("H");
+            }
+            if (minute != 0) {
+                WriteValueTools.writeInt(minute, ps);
+                ps.print("M");
+            }
+            if (second != 0 || millisecond != 0) {
+                WriteValueTools.writeInt(second, ps);
+            }
+            if (millisecond > 0) {
+                ps.print(".");
+                WriteValueTools.writeInt(millisecond, ps);
+            }
+            if (second != 0 || millisecond != 0) {
+                ps.print("S");
+            }
+            ps.print("\")");
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinterFactory.java
new file mode 100644
index 0000000..fe26a42
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADayTimeDurationPrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ADayTimeDurationPrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ADayTimeDurationPrinterFactory INSTANCE = new ADayTimeDurationPrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ADayTimeDurationPrinter.INSTANCE;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADoublePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADoublePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADoublePrinter.java
new file mode 100644
index 0000000..a94723f
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADoublePrinter.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class ADoublePrinter implements IPrinter {
+
+    public static final ADoublePrinter INSTANCE = new ADoublePrinter();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1) + "d");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADoublePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADoublePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADoublePrinterFactory.java
new file mode 100644
index 0000000..fc93fa3
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADoublePrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ADoublePrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ADoublePrinterFactory INSTANCE = new ADoublePrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ADoublePrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinter.java
new file mode 100644
index 0000000..589626c
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinter.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
+
+public class ADurationPrinter implements IPrinter {
+
+    public static final ADurationPrinter INSTANCE = new ADurationPrinter();
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        boolean positive = true;
+        int months = AInt32SerializerDeserializer.getInt(b, s + 1);
+        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 5);
+
+        // set the negative flag. "||" is necessary in case that months field is not there (so it is 0)
+        if (months < 0 || milliseconds < 0) {
+            months *= -1;
+            milliseconds *= -1;
+            positive = false;
+        }
+
+        int month = gCalInstance.getDurationMonth(months);
+        int year = gCalInstance.getDurationYear(months);
+        int millisecond = gCalInstance.getDurationMillisecond(milliseconds);
+        int second = gCalInstance.getDurationSecond(milliseconds);
+        int minute = gCalInstance.getDurationMinute(milliseconds);
+        int hour = gCalInstance.getDurationHour(milliseconds);
+        int day = gCalInstance.getDurationDay(milliseconds);
+
+        ps.print("duration(\"");
+        if (!positive) {
+            ps.print("-");
+        }
+        try {
+            ps.print("P");
+            if (year != 0) {
+                WriteValueTools.writeInt(year, ps);
+                ps.print("Y");
+            }
+            if (month != 0) {
+                WriteValueTools.writeInt(month, ps);
+                ps.print("M");
+            }
+            if (day != 0) {
+                WriteValueTools.writeInt(day, ps);
+                ps.print("D");
+            }
+            if (hour != 0 || minute != 0 || second != 0 || millisecond != 0) {
+                ps.print("T");
+            }
+            if (hour != 0) {
+                WriteValueTools.writeInt(hour, ps);
+                ps.print("H");
+            }
+            if (minute != 0) {
+                WriteValueTools.writeInt(minute, ps);
+                ps.print("M");
+            }
+            if (second != 0 || millisecond != 0) {
+                WriteValueTools.writeInt(second, ps);
+            }
+            if (millisecond > 0) {
+                ps.print(".");
+                WriteValueTools.writeInt(millisecond, ps);
+            }
+            if (second != 0 || millisecond != 0) {
+                ps.print("S");
+            }
+            ps.print("\")");
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinterFactory.java
new file mode 100644
index 0000000..d8eda37
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ADurationPrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ADurationPrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ADurationPrinterFactory INSTANCE = new ADurationPrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ADurationPrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AFloatPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AFloatPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AFloatPrinter.java
new file mode 100644
index 0000000..e5f2861
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AFloatPrinter.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AFloatSerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class AFloatPrinter implements IPrinter {
+
+    public static final AFloatPrinter INSTANCE = new AFloatPrinter();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print(AFloatSerializerDeserializer.getFloat(b, s + 1) + "f");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AFloatPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AFloatPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AFloatPrinterFactory.java
new file mode 100644
index 0000000..03d91fa
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AFloatPrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class AFloatPrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final AFloatPrinterFactory INSTANCE = new AFloatPrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return AFloatPrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt16Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt16Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt16Printer.java
new file mode 100644
index 0000000..9076750
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt16Printer.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
+import org.apache.hyracks.data.std.util.ByteArrayAccessibleOutputStream;
+
+public class AInt16Printer implements IPrinter {
+
+    private static final String SUFFIX_STRING = "i16";
+    private static byte[] _suffix;
+    private static int _suffix_count;
+    static {
+        ByteArrayAccessibleOutputStream interm = new ByteArrayAccessibleOutputStream();
+        DataOutput dout = new DataOutputStream(interm);
+        try {
+            dout.writeUTF(SUFFIX_STRING);
+            interm.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        _suffix = interm.getByteArray();
+        _suffix_count = interm.size();
+    }
+
+    public static final AInt16Printer INSTANCE = new AInt16Printer();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        short i = AInt16SerializerDeserializer.getShort(b, s + 1);
+        try {
+            WriteValueTools.writeInt(i, ps);
+            WriteValueTools.writeUTF8StringNoQuotes(_suffix, 0, _suffix_count, ps);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt16PrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt16PrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt16PrinterFactory.java
new file mode 100644
index 0000000..c0f5561
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt16PrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class AInt16PrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final AInt16PrinterFactory INSTANCE = new AInt16PrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return AInt16Printer.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt32Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt32Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt32Printer.java
new file mode 100644
index 0000000..036d16d
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt32Printer.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
+import org.apache.hyracks.data.std.util.ByteArrayAccessibleOutputStream;
+
+public class AInt32Printer implements IPrinter {
+
+    private static final String SUFFIX_STRING = "i32";
+    private static byte[] _suffix;
+    private static int _suffix_count;
+    static {
+        ByteArrayAccessibleOutputStream interm = new ByteArrayAccessibleOutputStream();
+        DataOutput dout = new DataOutputStream(interm);
+        try {
+            dout.writeUTF(SUFFIX_STRING);
+            interm.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        _suffix = interm.getByteArray();
+        _suffix_count = interm.size();
+    }
+
+    public static final AInt32Printer INSTANCE = new AInt32Printer();
+
+    @Override
+    public void init() {
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        int d = AInt32SerializerDeserializer.getInt(b, s + 1);
+        try {
+            WriteValueTools.writeInt(d, ps);
+            WriteValueTools.writeUTF8StringNoQuotes(_suffix, 0, _suffix_count, ps);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt32PrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt32PrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt32PrinterFactory.java
new file mode 100644
index 0000000..612e549
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt32PrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class AInt32PrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final AInt32PrinterFactory INSTANCE = new AInt32PrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return AInt32Printer.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt64Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt64Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt64Printer.java
new file mode 100644
index 0000000..8401889
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt64Printer.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
+
+public class AInt64Printer implements IPrinter {
+
+    public static final AInt64Printer INSTANCE = new AInt64Printer();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        long d = AInt64SerializerDeserializer.getLong(b, s + 1);
+        try {
+            WriteValueTools.writeLong(d, ps);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt64PrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt64PrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt64PrinterFactory.java
new file mode 100644
index 0000000..da44b03
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt64PrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class AInt64PrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final AInt64PrinterFactory INSTANCE = new AInt64PrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return AInt64Printer.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt8Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt8Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt8Printer.java
new file mode 100644
index 0000000..38eb91e
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt8Printer.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt8SerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.utils.WriteValueTools;
+import org.apache.hyracks.data.std.util.ByteArrayAccessibleOutputStream;
+
+public class AInt8Printer implements IPrinter {
+
+    private static final String SUFFIX_STRING = "i8";
+    private static byte[] _suffix;
+    private static int _suffix_count;
+    static {
+        ByteArrayAccessibleOutputStream interm = new ByteArrayAccessibleOutputStream();
+        DataOutput dout = new DataOutputStream(interm);
+        try {
+            dout.writeUTF(SUFFIX_STRING);
+            interm.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        _suffix = interm.getByteArray();
+        _suffix_count = interm.size();
+    }
+
+    public static final AInt8Printer INSTANCE = new AInt8Printer();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        byte o = AInt8SerializerDeserializer.getByte(b, s + 1);
+        try {
+            WriteValueTools.writeInt(o, ps);
+            WriteValueTools.writeUTF8StringNoQuotes(_suffix, 0, _suffix_count, ps);
+        } catch (IOException e) {
+            throw new AlgebricksException(e);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt8PrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt8PrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt8PrinterFactory.java
new file mode 100644
index 0000000..3fc67ab
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AInt8PrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class AInt8PrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final AInt8PrinterFactory INSTANCE = new AInt8PrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return AInt8Printer.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinter.java
new file mode 100644
index 0000000..1c0adc6
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinter.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.AInt8SerializerDeserializer;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class AIntervalPrinter implements IPrinter {
+
+    public static final AIntervalPrinter INSTANCE = new AIntervalPrinter();
+
+    /* (non-Javadoc)
+     * @see org.apache.hyracks.algebricks.data.IPrinter#init()
+     */
+    @Override
+    public void init() throws AlgebricksException {
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.hyracks.algebricks.data.IPrinter#print(byte[], int, int, java.io.PrintStream)
+     */
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print("interval");
+
+        short typetag = AInt8SerializerDeserializer.getByte(b, s + 1 + 8 * 2);
+
+        IPrinter timeInstancePrinter;
+
+        if (typetag == ATypeTag.DATE.serialize()) {
+            ps.print("-date(\"");
+            timeInstancePrinter = ADatePrinter.INSTANCE;
+            ((ADatePrinter) timeInstancePrinter).printString(b, s + 4, 4, ps);
+            ps.print(", ");
+            ((ADatePrinter) timeInstancePrinter).printString(b, s + 12, 4, ps);
+        } else if (typetag == ATypeTag.TIME.serialize()) {
+            ps.print("-time(\"");
+            timeInstancePrinter = ATimePrinter.INSTANCE;
+            ((ATimePrinter) timeInstancePrinter).printString(b, s + 4, 4, ps);
+            ps.print(", ");
+            ((ATimePrinter) timeInstancePrinter).printString(b, s + 12, 4, ps);
+        } else if (typetag == ATypeTag.DATETIME.serialize()) {
+            ps.print("-datetime(\"");
+            timeInstancePrinter = ADateTimePrinter.INSTANCE;
+            ((ADateTimePrinter) timeInstancePrinter).printString(b, s, 8, ps);
+            ps.print(", ");
+            ((ADateTimePrinter) timeInstancePrinter).printString(b, s + 8, 8, ps);
+        } else {
+            throw new AlgebricksException("Unsupport internal time types in interval: " + typetag);
+        }
+
+        ps.print("\")");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinterFactory.java
new file mode 100644
index 0000000..95dd10d
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/AIntervalPrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class AIntervalPrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final AIntervalPrinterFactory INSTANCE = new AIntervalPrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return AIntervalPrinter.INSTANCE;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ALinePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ALinePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ALinePrinter.java
new file mode 100644
index 0000000..734c850
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ALinePrinter.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.PrintStream;
+
+import org.apache.asterix.dataflow.data.nontagged.serde.ADoubleSerializerDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class ALinePrinter implements IPrinter {
+
+    public static final ALinePrinter INSTANCE = new ALinePrinter();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print("line(\"");
+        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
+        ps.print(",");
+        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 9));
+        ps.print(" ");
+        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 17));
+        ps.print(",");
+        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 25));
+        ps.print("\")");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ALinePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ALinePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ALinePrinterFactory.java
new file mode 100644
index 0000000..67993fb
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ALinePrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ALinePrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ALinePrinterFactory INSTANCE = new ALinePrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ALinePrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullPrinter.java
new file mode 100644
index 0000000..95de99e
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullPrinter.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.PrintStream;
+
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+
+public class ANullPrinter implements IPrinter {
+
+    public static final ANullPrinter INSTANCE = new ANullPrinter();
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+        ps.print("null");
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullPrinterFactory.java
new file mode 100644
index 0000000..a9b9a0c
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullPrinterFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ANullPrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+    public static final ANullPrinterFactory INSTANCE = new ANullPrinterFactory();
+
+    @Override
+    public IPrinter createPrinter() {
+        return ANullPrinter.INSTANCE;
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullableFieldPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullableFieldPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullableFieldPrinterFactory.java
new file mode 100644
index 0000000..a125956
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/adm/ANullableFieldPrinterFactory.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.printers.adm;
+
+import java.io.PrintStream;
+
+import org.apache.asterix.formats.nontagged.AqlADMPrinterFactoryProvider;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.AUnionType;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.data.IPrinter;
+import org.apache.hyracks.algebricks.data.IPrinterFactory;
+
+public class ANullableFieldPrinterFactory implements IPrinterFactory {
+
+    private static final long serialVersionUID = 1L;
+
+    private AUnionType unionType;
+
+    public ANullableFieldPrinterFactory(AUnionType unionType) {
+        this.unionType = unionType;
+    }
+
+    @Override
+    public IPrinter createPrinter() {
+        return new IPrinter() {
+            private IPrinter nullPrinter;
+            private IPrinter fieldPrinter;
+
+            @Override
+            public void init() throws AlgebricksException {
+                nullPrinter = (AqlADMPrinterFactoryProvider.INSTANCE.getPrinterFactory(BuiltinType.ANULL)).createPrinter();
+                fieldPrinter = (AqlADMPrinterFactoryProvider.INSTANCE.getPrinterFactory(unionType.getNullableType()))
+                        .createPrinter();
+            }
+
+            @Override
+            public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
+                fieldPrinter.init();
+                if (b[s] == ATypeTag.NULL.serialize())
+                    nullPrinter.print(b, s, l, ps);
+                else
+                    fieldPrinter.print(b, s, l, ps);
+            }
+
+        };
+    }
+
+}