asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject [1/5] incubator-asterixdb git commit: Move ADM-specific printers and related classes into .adm packages.
Date Thu, 08 Oct 2015 16:44:45 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master 79dfcfcd7 -> 2574f43d8


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlPrinterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlPrinterFactoryProvider.java b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlPrinterFactoryProvider.java
deleted file mode 100644
index 04e7b38..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlPrinterFactoryProvider.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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.formats.nontagged;
-
-import org.apache.asterix.dataflow.data.nontagged.printers.ABinaryPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ABooleanPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ACirclePrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADatePrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADateTimePrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADayTimeDurationPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADoublePrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADurationPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AFloatPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AInt16PrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AInt32PrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AInt64PrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AInt8PrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AIntervalPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ALinePrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ANullPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ANullableFieldPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AObjectPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AOrderedlistPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.APoint3DPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.APointPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.APolygonPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ARecordPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ARectanglePrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AStringPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ATimePrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AUUIDPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AUnionPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AUnorderedlistPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.AYearMonthDurationPrinterFactory;
-import org.apache.asterix.dataflow.data.nontagged.printers.ShortWithoutTypeInfoPrinterFactory;
-import org.apache.asterix.om.types.AOrderedListType;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.AUnorderedListType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.data.IPrinterFactory;
-import org.apache.hyracks.algebricks.data.IPrinterFactoryProvider;
-
-public class AqlPrinterFactoryProvider implements IPrinterFactoryProvider {
-
-    public static final AqlPrinterFactoryProvider INSTANCE = new AqlPrinterFactoryProvider();
-
-    private AqlPrinterFactoryProvider() {
-    }
-
-    @Override
-    public IPrinterFactory getPrinterFactory(Object type) throws AlgebricksException {
-        IAType aqlType = (IAType) type;
-
-        if (aqlType != null) {
-            switch (aqlType.getTypeTag()) {
-                case INT8:
-                    return AInt8PrinterFactory.INSTANCE;
-                case INT16:
-                    return AInt16PrinterFactory.INSTANCE;
-                case INT32:
-                    return AInt32PrinterFactory.INSTANCE;
-                case INT64:
-                    return AInt64PrinterFactory.INSTANCE;
-                case NULL:
-                    return ANullPrinterFactory.INSTANCE;
-                case BOOLEAN:
-                    return ABooleanPrinterFactory.INSTANCE;
-                case FLOAT:
-                    return AFloatPrinterFactory.INSTANCE;
-                case DOUBLE:
-                    return ADoublePrinterFactory.INSTANCE;
-                case TIME:
-                    return ATimePrinterFactory.INSTANCE;
-                case DATE:
-                    return ADatePrinterFactory.INSTANCE;
-                case DATETIME:
-                    return ADateTimePrinterFactory.INSTANCE;
-                case DURATION:
-                    return ADurationPrinterFactory.INSTANCE;
-                case DAYTIMEDURATION:
-                    return ADayTimeDurationPrinterFactory.INSTANCE;
-                case YEARMONTHDURATION:
-                    return AYearMonthDurationPrinterFactory.INSTANCE;
-                case INTERVAL:
-                    return AIntervalPrinterFactory.INSTANCE;
-                case POINT:
-                    return APointPrinterFactory.INSTANCE;
-                case POINT3D:
-                    return APoint3DPrinterFactory.INSTANCE;
-                case LINE:
-                    return ALinePrinterFactory.INSTANCE;
-                case POLYGON:
-                    return APolygonPrinterFactory.INSTANCE;
-                case CIRCLE:
-                    return ACirclePrinterFactory.INSTANCE;
-                case RECTANGLE:
-                    return ARectanglePrinterFactory.INSTANCE;
-                case STRING:
-                    return AStringPrinterFactory.INSTANCE;
-                case BINARY:
-                    return ABinaryPrinterFactory.INSTANCE;
-                case RECORD:
-                    return new ARecordPrinterFactory((ARecordType) aqlType);
-                case ORDEREDLIST:
-                    return new AOrderedlistPrinterFactory((AOrderedListType) aqlType);
-                case UNORDEREDLIST:
-                    return new AUnorderedlistPrinterFactory((AUnorderedListType) aqlType);
-                case UNION: {
-                    if (((AUnionType) aqlType).isNullableType())
-                        return new ANullableFieldPrinterFactory((AUnionType) aqlType);
-                    else
-                        return new AUnionPrinterFactory((AUnionType) aqlType);
-                }
-                case UUID: {
-                    return AUUIDPrinterFactory.INSTANCE;
-                }
-                case SHORTWITHOUTTYPEINFO:
-                    return ShortWithoutTypeInfoPrinterFactory.INSTANCE;
-                case ANY:
-                case BITARRAY:
-                case ENUM:
-                case SPARSERECORD:
-                case SYSTEM_NULL:
-                case TYPE:
-                case UINT16:
-                case UINT32:
-                case UINT64:
-                case UINT8:
-                case UUID_STRING:
-                    // These types are not intended to be printed to the user.
-                    break;
-            }
-        }
-        return AObjectPrinterFactory.INSTANCE;
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
index af7e646..ab80f4f 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
@@ -35,7 +35,7 @@ import org.apache.asterix.om.pointables.ARecordVisitablePointable;
 import org.apache.asterix.om.pointables.PointableAllocator;
 import org.apache.asterix.om.pointables.base.DefaultOpenFieldType;
 import org.apache.asterix.om.pointables.base.IVisitablePointable;
-import org.apache.asterix.om.pointables.printer.APrintVisitor;
+import org.apache.asterix.om.pointables.printer.adm.APrintVisitor;
 import org.apache.asterix.om.types.ARecordType;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.AUnionType;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/AListPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/AListPrinter.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/AListPrinter.java
deleted file mode 100644
index 40dd6eb..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/AListPrinter.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.om.pointables.printer;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.List;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.om.pointables.AListVisitablePointable;
-import org.apache.asterix.om.pointables.base.IVisitablePointable;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-
-/**
- * This class is to print the content of a list. It is ONLY visible to
- * APrintVisitor.
- */
-class AListPrinter {
-    private static String LEFT_PAREN = "{{ ";
-    private static String RIGHT_PAREN = " }}";
-    private static String LEFT_PAREN_ORDERED = "[ ";
-    private static String RIGHT_PAREN_ORDERED = " ]";
-    private static String COMMA = ", ";
-
-    private final Pair<PrintStream, ATypeTag> itemVisitorArg = new Pair<PrintStream, ATypeTag>(null, null);
-    private String leftParen = LEFT_PAREN;
-    private String rightParen = RIGHT_PAREN;
-
-    public AListPrinter(boolean ordered) {
-        if (ordered) {
-            leftParen = LEFT_PAREN_ORDERED;
-            rightParen = RIGHT_PAREN_ORDERED;
-        }
-    }
-
-    public void printList(AListVisitablePointable listAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
-        List<IVisitablePointable> itemTags = listAccessor.getItemTags();
-        List<IVisitablePointable> items = listAccessor.getItems();
-        itemVisitorArg.first = ps;
-
-        // print the beginning part
-        ps.print(leftParen);
-
-        // print item 0 to n-2
-        for (int i = 0; i < items.size() - 1; i++) {
-            printItem(visitor, itemTags, items, i);
-            // print the comma
-            ps.print(COMMA);
-        }
-
-        // print item n-1
-        if (items.size() > 0) {
-            printItem(visitor, itemTags, items, items.size() - 1);
-        }
-
-        // print the end part
-        ps.print(rightParen);
-    }
-
-    private void printItem(APrintVisitor visitor, List<IVisitablePointable> itemTags, List<IVisitablePointable> items,
-            int i) throws AsterixException {
-        IVisitablePointable itemTypeTag = itemTags.get(i);
-        IVisitablePointable item = items.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
-        itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
-        item.accept(visitor, itemVisitorArg);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/APrintVisitor.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/APrintVisitor.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/APrintVisitor.java
deleted file mode 100644
index c767026..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/APrintVisitor.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * 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.om.pointables.printer;
-
-import java.io.PrintStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.dataflow.data.nontagged.printers.ABinaryHexPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ABooleanPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ACirclePrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADatePrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADateTimePrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADayTimeDurationPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADoublePrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ADurationPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.AFloatPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.AInt16Printer;
-import org.apache.asterix.dataflow.data.nontagged.printers.AInt32Printer;
-import org.apache.asterix.dataflow.data.nontagged.printers.AInt64Printer;
-import org.apache.asterix.dataflow.data.nontagged.printers.AInt8Printer;
-import org.apache.asterix.dataflow.data.nontagged.printers.AIntervalPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ALinePrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ANullPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.APoint3DPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.APointPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.APolygonPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ARectanglePrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.AStringPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ATimePrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.AUUIDPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.AYearMonthDurationPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ShortWithoutTypeInfoPrinter;
-import org.apache.asterix.om.pointables.AFlatValuePointable;
-import org.apache.asterix.om.pointables.AListVisitablePointable;
-import org.apache.asterix.om.pointables.ARecordVisitablePointable;
-import org.apache.asterix.om.pointables.base.IVisitablePointable;
-import org.apache.asterix.om.pointables.visitor.IVisitablePointableVisitor;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-
-/**
- * This class is a IVisitablePointableVisitor implementation which recursively
- * visit a given record, list or flat value of a given type, and print it to a
- * PrintStream in adm format.
- */
-public class APrintVisitor implements IVisitablePointableVisitor<Void, Pair<PrintStream, ATypeTag>> {
-
-    private final Map<IVisitablePointable, ARecordPrinter> raccessorToPrinter = new HashMap<IVisitablePointable, ARecordPrinter>();
-    private final Map<IVisitablePointable, AListPrinter> laccessorToPrinter = new HashMap<IVisitablePointable, AListPrinter>();
-
-    @Override
-    public Void visit(AListVisitablePointable accessor, Pair<PrintStream, ATypeTag> arg) throws AsterixException {
-        AListPrinter printer = laccessorToPrinter.get(accessor);
-        if (printer == null) {
-            printer = new AListPrinter(accessor.ordered());
-            laccessorToPrinter.put(accessor, printer);
-        }
-        try {
-            printer.printList(accessor, arg.first, this);
-        } catch (Exception e) {
-            throw new AsterixException(e);
-        }
-        return null;
-    }
-
-    @Override
-    public Void visit(ARecordVisitablePointable accessor, Pair<PrintStream, ATypeTag> arg) throws AsterixException {
-        ARecordPrinter printer = raccessorToPrinter.get(accessor);
-        if (printer == null) {
-            printer = new ARecordPrinter();
-            raccessorToPrinter.put(accessor, printer);
-        }
-        try {
-            printer.printRecord(accessor, arg.first, this);
-        } catch (Exception e) {
-            throw new AsterixException(e);
-        }
-        return null;
-    }
-
-    @Override
-    public Void visit(AFlatValuePointable accessor, Pair<PrintStream, ATypeTag> arg) {
-        try {
-            byte[] b = accessor.getByteArray();
-            int s = accessor.getStartOffset();
-            int l = accessor.getLength();
-            PrintStream ps = arg.first;
-            ATypeTag typeTag = arg.second;
-            switch (typeTag) {
-                case INT8: {
-                    AInt8Printer.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case INT16: {
-                    AInt16Printer.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case INT32: {
-                    AInt32Printer.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case INT64: {
-                    AInt64Printer.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case NULL: {
-                    ANullPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case BOOLEAN: {
-                    ABooleanPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case FLOAT: {
-                    AFloatPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case DOUBLE: {
-                    ADoublePrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case DATE: {
-                    ADatePrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case TIME: {
-                    ATimePrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case DATETIME: {
-                    ADateTimePrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case DURATION: {
-                    ADurationPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case YEARMONTHDURATION: {
-                    AYearMonthDurationPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case DAYTIMEDURATION: {
-                    ADayTimeDurationPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case POINT: {
-                    APointPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case POINT3D: {
-                    APoint3DPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case LINE: {
-                    ALinePrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case POLYGON: {
-                    APolygonPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case CIRCLE: {
-                    ACirclePrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case RECTANGLE: {
-                    ARectanglePrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case STRING: {
-                    AStringPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case BINARY: {
-                    ABinaryHexPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case INTERVAL: {
-                    AIntervalPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case UUID: {
-                    AUUIDPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                case SHORTWITHOUTTYPEINFO: {
-                    ShortWithoutTypeInfoPrinter.INSTANCE.print(b, s, l, ps);
-                    break;
-                }
-                default: {
-                    throw new NotImplementedException("No printer for type " + typeTag);
-                }
-            }
-            return null;
-        } catch (Exception e) {
-            throw new IllegalStateException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/ARecordPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/ARecordPrinter.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/ARecordPrinter.java
deleted file mode 100644
index 99aec0e..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/ARecordPrinter.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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.om.pointables.printer;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.List;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.om.pointables.ARecordVisitablePointable;
-import org.apache.asterix.om.pointables.base.IVisitablePointable;
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-
-/**
- * This class is to print the content of a record. It is ONLY visible to
- * APrintVisitor.
- */
-class ARecordPrinter {
-    private static String LEFT_BRACE = "{ ";
-    private static String RIGHT_BRACE = " }";
-    private static String COMMA = ", ";
-    private static String COLON = ": ";
-
-    private final Pair<PrintStream, ATypeTag> nameVisitorArg = new Pair<PrintStream, ATypeTag>(null, ATypeTag.STRING);
-    private final Pair<PrintStream, ATypeTag> itemVisitorArg = new Pair<PrintStream, ATypeTag>(null, null);
-
-    public ARecordPrinter() {
-
-    }
-
-    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
-            AsterixException {
-        List<IVisitablePointable> fieldNames = recordAccessor.getFieldNames();
-        List<IVisitablePointable> fieldTags = recordAccessor.getFieldTypeTags();
-        List<IVisitablePointable> fieldValues = recordAccessor.getFieldValues();
-
-        nameVisitorArg.first = ps;
-        itemVisitorArg.first = ps;
-
-        // print the beginning part
-        ps.print(LEFT_BRACE);
-
-        // print field 0 to n-2
-        for (int i = 0; i < fieldNames.size() - 1; i++) {
-            printField(ps, visitor, fieldNames, fieldTags, fieldValues, i);
-            // print the comma
-            ps.print(COMMA);
-        }
-
-        // print field n-1
-        if (fieldValues.size() > 0) {
-            printField(ps, visitor, fieldNames, fieldTags, fieldValues, fieldValues.size() - 1);
-        }
-
-        // print the end part
-        ps.print(RIGHT_BRACE);
-    }
-
-    private void printField(PrintStream ps, APrintVisitor visitor, List<IVisitablePointable> fieldNames,
-            List<IVisitablePointable> fieldTags, List<IVisitablePointable> fieldValues, int i) throws AsterixException {
-        IVisitablePointable itemTypeTag = fieldTags.get(i);
-        IVisitablePointable item = fieldValues.get(i);
-        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
-                .getStartOffset()]);
-        itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
-
-        // print field name
-        fieldNames.get(i).accept(visitor, nameVisitorArg);
-        ps.print(COLON);
-        // print field value
-        item.accept(visitor, itemVisitorArg);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/AListPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/AListPrinter.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/AListPrinter.java
new file mode 100644
index 0000000..c5964b4
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/AListPrinter.java
@@ -0,0 +1,89 @@
+/*
+ * 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.om.pointables.printer.adm;
+
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.List;
+
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.om.pointables.AListVisitablePointable;
+import org.apache.asterix.om.pointables.base.IVisitablePointable;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.common.utils.Pair;
+
+/**
+ * This class is to print the content of a list. It is ONLY visible to
+ * APrintVisitor.
+ */
+class AListPrinter {
+    private static String LEFT_PAREN = "{{ ";
+    private static String RIGHT_PAREN = " }}";
+    private static String LEFT_PAREN_ORDERED = "[ ";
+    private static String RIGHT_PAREN_ORDERED = " ]";
+    private static String COMMA = ", ";
+
+    private final Pair<PrintStream, ATypeTag> itemVisitorArg = new Pair<PrintStream, ATypeTag>(null, null);
+    private String leftParen = LEFT_PAREN;
+    private String rightParen = RIGHT_PAREN;
+
+    public AListPrinter(boolean ordered) {
+        if (ordered) {
+            leftParen = LEFT_PAREN_ORDERED;
+            rightParen = RIGHT_PAREN_ORDERED;
+        }
+    }
+
+    public void printList(AListVisitablePointable listAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
+            AsterixException {
+        List<IVisitablePointable> itemTags = listAccessor.getItemTags();
+        List<IVisitablePointable> items = listAccessor.getItems();
+        itemVisitorArg.first = ps;
+
+        // print the beginning part
+        ps.print(leftParen);
+
+        // print item 0 to n-2
+        for (int i = 0; i < items.size() - 1; i++) {
+            printItem(visitor, itemTags, items, i);
+            // print the comma
+            ps.print(COMMA);
+        }
+
+        // print item n-1
+        if (items.size() > 0) {
+            printItem(visitor, itemTags, items, items.size() - 1);
+        }
+
+        // print the end part
+        ps.print(rightParen);
+    }
+
+    private void printItem(APrintVisitor visitor, List<IVisitablePointable> itemTags, List<IVisitablePointable> items,
+            int i) throws AsterixException {
+        IVisitablePointable itemTypeTag = itemTags.get(i);
+        IVisitablePointable item = items.get(i);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
+                .getStartOffset()]);
+        itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
+        item.accept(visitor, itemVisitorArg);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/APrintVisitor.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/APrintVisitor.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/APrintVisitor.java
new file mode 100644
index 0000000..d4f8652
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/APrintVisitor.java
@@ -0,0 +1,219 @@
+/*
+ * 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.om.pointables.printer.adm;
+
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABinaryHexPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABooleanPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ACirclePrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ADatePrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ADateTimePrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ADayTimeDurationPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ADoublePrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ADurationPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AFloatPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AInt16Printer;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AInt32Printer;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AInt64Printer;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AInt8Printer;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AIntervalPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ALinePrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ANullPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.APoint3DPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.APointPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.APolygonPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ARectanglePrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AStringPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ATimePrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AUUIDPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AYearMonthDurationPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ShortWithoutTypeInfoPrinter;
+import org.apache.asterix.om.pointables.AFlatValuePointable;
+import org.apache.asterix.om.pointables.AListVisitablePointable;
+import org.apache.asterix.om.pointables.ARecordVisitablePointable;
+import org.apache.asterix.om.pointables.base.IVisitablePointable;
+import org.apache.asterix.om.pointables.visitor.IVisitablePointableVisitor;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+import org.apache.hyracks.algebricks.common.utils.Pair;
+
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This class is a IVisitablePointableVisitor implementation which recursively
+ * visit a given record, list or flat value of a given type, and print it to a
+ * PrintStream in adm format.
+ */
+public class APrintVisitor implements IVisitablePointableVisitor<Void, Pair<PrintStream, ATypeTag>> {
+
+    private final Map<IVisitablePointable, ARecordPrinter> raccessorToPrinter = new HashMap<IVisitablePointable, ARecordPrinter>();
+    private final Map<IVisitablePointable, AListPrinter> laccessorToPrinter = new HashMap<IVisitablePointable, AListPrinter>();
+
+    @Override
+    public Void visit(AListVisitablePointable accessor, Pair<PrintStream, ATypeTag> arg) throws AsterixException {
+        AListPrinter printer = laccessorToPrinter.get(accessor);
+        if (printer == null) {
+            printer = new AListPrinter(accessor.ordered());
+            laccessorToPrinter.put(accessor, printer);
+        }
+        try {
+            printer.printList(accessor, arg.first, this);
+        } catch (Exception e) {
+            throw new AsterixException(e);
+        }
+        return null;
+    }
+
+    @Override
+    public Void visit(ARecordVisitablePointable accessor, Pair<PrintStream, ATypeTag> arg) throws AsterixException {
+        ARecordPrinter printer = raccessorToPrinter.get(accessor);
+        if (printer == null) {
+            printer = new ARecordPrinter();
+            raccessorToPrinter.put(accessor, printer);
+        }
+        try {
+            printer.printRecord(accessor, arg.first, this);
+        } catch (Exception e) {
+            throw new AsterixException(e);
+        }
+        return null;
+    }
+
+    @Override
+    public Void visit(AFlatValuePointable accessor, Pair<PrintStream, ATypeTag> arg) {
+        try {
+            byte[] b = accessor.getByteArray();
+            int s = accessor.getStartOffset();
+            int l = accessor.getLength();
+            PrintStream ps = arg.first;
+            ATypeTag typeTag = arg.second;
+            switch (typeTag) {
+                case INT8: {
+                    AInt8Printer.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case INT16: {
+                    AInt16Printer.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case INT32: {
+                    AInt32Printer.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case INT64: {
+                    AInt64Printer.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case NULL: {
+                    ANullPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case BOOLEAN: {
+                    ABooleanPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case FLOAT: {
+                    AFloatPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case DOUBLE: {
+                    ADoublePrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case DATE: {
+                    ADatePrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case TIME: {
+                    ATimePrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case DATETIME: {
+                    ADateTimePrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case DURATION: {
+                    ADurationPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case YEARMONTHDURATION: {
+                    AYearMonthDurationPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case DAYTIMEDURATION: {
+                    ADayTimeDurationPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case POINT: {
+                    APointPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case POINT3D: {
+                    APoint3DPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case LINE: {
+                    ALinePrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case POLYGON: {
+                    APolygonPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case CIRCLE: {
+                    ACirclePrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case RECTANGLE: {
+                    ARectanglePrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case STRING: {
+                    AStringPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case BINARY: {
+                    ABinaryHexPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case INTERVAL: {
+                    AIntervalPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case UUID: {
+                    AUUIDPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                case SHORTWITHOUTTYPEINFO: {
+                    ShortWithoutTypeInfoPrinter.INSTANCE.print(b, s, l, ps);
+                    break;
+                }
+                default: {
+                    throw new NotImplementedException("No printer for type " + typeTag);
+                }
+            }
+            return null;
+        } catch (Exception e) {
+            throw new IllegalStateException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/ARecordPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/ARecordPrinter.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/ARecordPrinter.java
new file mode 100644
index 0000000..4cbcf71
--- /dev/null
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/adm/ARecordPrinter.java
@@ -0,0 +1,92 @@
+/*
+ * 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.om.pointables.printer.adm;
+
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.om.pointables.ARecordVisitablePointable;
+import org.apache.asterix.om.pointables.base.IVisitablePointable;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.common.utils.Pair;
+
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.List;
+
+/**
+ * This class is to print the content of a record. It is ONLY visible to
+ * APrintVisitor.
+ */
+class ARecordPrinter {
+    private static String LEFT_BRACE = "{ ";
+    private static String RIGHT_BRACE = " }";
+    private static String COMMA = ", ";
+    private static String COLON = ": ";
+
+    private final Pair<PrintStream, ATypeTag> nameVisitorArg = new Pair<PrintStream, ATypeTag>(null, ATypeTag.STRING);
+    private final Pair<PrintStream, ATypeTag> itemVisitorArg = new Pair<PrintStream, ATypeTag>(null, null);
+
+    public ARecordPrinter() {
+
+    }
+
+    public void printRecord(ARecordVisitablePointable recordAccessor, PrintStream ps, APrintVisitor visitor) throws IOException,
+            AsterixException {
+        List<IVisitablePointable> fieldNames = recordAccessor.getFieldNames();
+        List<IVisitablePointable> fieldTags = recordAccessor.getFieldTypeTags();
+        List<IVisitablePointable> fieldValues = recordAccessor.getFieldValues();
+
+        nameVisitorArg.first = ps;
+        itemVisitorArg.first = ps;
+
+        // print the beginning part
+        ps.print(LEFT_BRACE);
+
+        // print field 0 to n-2
+        for (int i = 0; i < fieldNames.size() - 1; i++) {
+            printField(ps, visitor, fieldNames, fieldTags, fieldValues, i);
+            // print the comma
+            ps.print(COMMA);
+        }
+
+        // print field n-1
+        if (fieldValues.size() > 0) {
+            printField(ps, visitor, fieldNames, fieldTags, fieldValues, fieldValues.size() - 1);
+        }
+
+        // print the end part
+        ps.print(RIGHT_BRACE);
+    }
+
+    private void printField(PrintStream ps, APrintVisitor visitor, List<IVisitablePointable> fieldNames,
+            List<IVisitablePointable> fieldTags, List<IVisitablePointable> fieldValues, int i) throws AsterixException {
+        IVisitablePointable itemTypeTag = fieldTags.get(i);
+        IVisitablePointable item = fieldValues.get(i);
+        ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(itemTypeTag.getByteArray()[itemTypeTag
+                .getStartOffset()]);
+        itemVisitorArg.second = item.getLength() <= 1 ? ATypeTag.NULL : typeTag;
+
+        // print field name
+        fieldNames.get(i).accept(visitor, nameVisitorArg);
+        ps.print(COLON);
+        // print field value
+        item.accept(visitor, itemVisitorArg);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java
index 8f21fb4..378be33 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/csv/APrintVisitor.java
@@ -24,8 +24,8 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.dataflow.data.nontagged.printers.AUUIDPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ShortWithoutTypeInfoPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AUUIDPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ShortWithoutTypeInfoPrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.csv.ABooleanPrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.csv.ACirclePrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.csv.ADatePrinter;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/APrintVisitor.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/APrintVisitor.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/APrintVisitor.java
index 89005d0..b459138 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/APrintVisitor.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/APrintVisitor.java
@@ -24,9 +24,9 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.dataflow.data.nontagged.printers.ABinaryHexPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.AUUIDPrinter;
-import org.apache.asterix.dataflow.data.nontagged.printers.ShortWithoutTypeInfoPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABinaryHexPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.AUUIDPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ShortWithoutTypeInfoPrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.json.ABooleanPrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.json.ACirclePrinter;
 import org.apache.asterix.dataflow.data.nontagged.printers.json.ADatePrinter;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java b/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java
index b3aa9de..f43890c 100644
--- a/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java
+++ b/asterix-om/src/test/java/org/apache/asterix/dataflow/data/nontagged/printers/ABinaryPrinterTest.java
@@ -19,6 +19,7 @@
 
 package org.apache.asterix.dataflow.data.nontagged.printers;
 
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABinaryHexPrinter;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.data.std.primitive.ByteArrayPointable;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
index 23fcacc..07cc44d 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/binary/PrintBinaryDescriptor.java
@@ -19,8 +19,8 @@
 
 package org.apache.asterix.runtime.evaluators.functions.binary;
 
-import org.apache.asterix.dataflow.data.nontagged.printers.ABinaryBase64Printer;
-import org.apache.asterix.dataflow.data.nontagged.printers.ABinaryHexPrinter;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABinaryBase64Printer;
+import org.apache.asterix.dataflow.data.nontagged.printers.adm.ABinaryHexPrinter;
 import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
 import org.apache.asterix.om.functions.IFunctionDescriptor;
 import org.apache.asterix.om.functions.IFunctionDescriptorFactory;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/2574f43d/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java b/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
index dd30697..1ccdf94 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/formats/NonTaggedDataFormat.java
@@ -32,7 +32,7 @@ import org.apache.asterix.formats.nontagged.AqlCSVPrinterFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlJSONPrinterFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlNormalizedKeyComputerFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlPredicateEvaluatorFactoryProvider;
-import org.apache.asterix.formats.nontagged.AqlPrinterFactoryProvider;
+import org.apache.asterix.formats.nontagged.AqlADMPrinterFactoryProvider;
 import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import org.apache.asterix.formats.nontagged.AqlTypeTraitProvider;
 import org.apache.asterix.om.base.ABoolean;
@@ -1053,8 +1053,8 @@ public class NonTaggedDataFormat implements IDataFormat {
     }
 
     @Override
-    public IPrinterFactoryProvider getPrinterFactoryProvider() {
-        return AqlPrinterFactoryProvider.INSTANCE;
+    public IPrinterFactoryProvider getADMPrinterFactoryProvider() {
+        return AqlADMPrinterFactoryProvider.INSTANCE;
     }
 
     @Override


Mime
View raw message