asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject [6/6] incubator-asterixdb git commit: Adding 'cleanjson' output format, along with implementation of lists.
Date Thu, 08 Oct 2015 16:45:04 GMT
Adding 'cleanjson' output format, along with implementation of lists.

Also includes test-framework update to allow testing of cleanjson.

Change-Id: I5c37d3b5aad7f286eba1cb8cb5f05ad456a6521c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/361
Reviewed-by: Ian Maxon <imaxon@apache.org>
Tested-by: Ian Maxon <imaxon@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/commit/f4a1c3c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/tree/f4a1c3c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/diff/f4a1c3c6

Branch: refs/heads/master
Commit: f4a1c3c60b917729b512c0ad10c1503739ed783b
Parents: 2574f43
Author: Chris Hillery <chillery@lambda.nu>
Authored: Thu Aug 20 18:33:06 2015 -0700
Committer: Chris Hillery <ceej@lambda.nu>
Committed: Wed Oct 7 18:42:41 2015 -0700

----------------------------------------------------------------------
 .../apache/asterix/api/common/APIFramework.java |   7 +-
 .../asterix/api/common/SessionConfig.java       |   7 +-
 .../asterix/api/http/servlet/APIServlet.java    |   4 +-
 .../api/http/servlet/ConnectorAPIServlet.java   |   2 +-
 .../api/http/servlet/QueryStatusAPIServlet.java |   2 +-
 .../api/http/servlet/RESTAPIServlet.java        |  15 +-
 .../api/http/servlet/ShutdownAPIServlet.java    |   4 +-
 .../org/apache/asterix/result/ResultUtils.java  |   8 +-
 .../src/main/resources/webui/querytemplate.html |   8 +-
 .../results/json/int01-cleanjson/int01.1.json   |   8 +
 .../json/int01-losslessjson/int01.1.json        |   8 +
 .../runtimets/results/json/int01/int01.1.json   |   8 -
 .../src/test/resources/runtimets/testsuite.xml  |   9 +-
 .../org/apache/asterix/test/aql/TestsUtils.java |   2 +-
 .../printers/json/ABooleanPrinter.java          |  40 ----
 .../printers/json/ABooleanPrinterFactory.java   |  34 ---
 .../nontagged/printers/json/ACirclePrinter.java |  46 ----
 .../printers/json/ACirclePrinterFactory.java    |  34 ---
 .../nontagged/printers/json/ADatePrinter.java   |  45 ----
 .../printers/json/ADatePrinterFactory.java      |  34 ---
 .../printers/json/ADateTimePrinter.java         |  44 ----
 .../printers/json/ADateTimePrinterFactory.java  |  34 ---
 .../printers/json/ADayTimeDurationPrinter.java  |  45 ----
 .../json/ADayTimeDurationPrinterFactory.java    |  34 ---
 .../nontagged/printers/json/ADoublePrinter.java |  40 ----
 .../printers/json/ADoublePrinterFactory.java    |  34 ---
 .../printers/json/ADurationPrinter.java         |  49 -----
 .../printers/json/ADurationPrinterFactory.java  |  34 ---
 .../nontagged/printers/json/AFloatPrinter.java  |  40 ----
 .../printers/json/AFloatPrinterFactory.java     |  34 ---
 .../nontagged/printers/json/AInt16Printer.java  |  43 ----
 .../printers/json/AInt16PrinterFactory.java     |  34 ---
 .../nontagged/printers/json/AInt32Printer.java  |  44 ----
 .../printers/json/AInt32PrinterFactory.java     |  34 ---
 .../nontagged/printers/json/AInt64Printer.java  |  41 ----
 .../printers/json/AInt64PrinterFactory.java     |  34 ---
 .../nontagged/printers/json/AInt8Printer.java   |  44 ----
 .../printers/json/AInt8PrinterFactory.java      |  34 ---
 .../printers/json/AIntervalPrinter.java         |  71 ------
 .../printers/json/AIntervalPrinterFactory.java  |  34 ---
 .../nontagged/printers/json/ALinePrinter.java   |  49 -----
 .../printers/json/ALinePrinterFactory.java      |  34 ---
 .../nontagged/printers/json/ANullPrinter.java   |  39 ----
 .../printers/json/ANullPrinterFactory.java      |  34 ---
 .../json/ANullableFieldPrinterFactory.java      |  67 ------
 .../nontagged/printers/json/AObjectPrinter.java | 171 ---------------
 .../printers/json/AObjectPrinterFactory.java    |  34 ---
 .../json/AOrderedlistPrinterFactory.java        |  73 -------
 .../printers/json/APoint3DPrinter.java          |  46 ----
 .../printers/json/APoint3DPrinterFactory.java   |  34 ---
 .../nontagged/printers/json/APointPrinter.java  |  44 ----
 .../printers/json/APointPrinterFactory.java     |  34 ---
 .../printers/json/APolygonPrinter.java          |  60 ------
 .../printers/json/APolygonPrinterFactory.java   |  34 ---
 .../printers/json/ARecordPrinterFactory.java    |  73 -------
 .../printers/json/ARectanglePrinter.java        |  49 -----
 .../printers/json/ARectanglePrinterFactory.java |  34 ---
 .../nontagged/printers/json/AStringPrinter.java |  45 ----
 .../printers/json/AStringPrinterFactory.java    |  34 ---
 .../nontagged/printers/json/ATimePrinter.java   |  45 ----
 .../printers/json/ATimePrinterFactory.java      |  34 ---
 .../printers/json/AUnionPrinterFactory.java     |  76 -------
 .../json/AUnorderedlistPrinterFactory.java      |  73 -------
 .../json/AYearMonthDurationPrinter.java         |  51 -----
 .../json/AYearMonthDurationPrinterFactory.java  |  37 ----
 .../printers/json/clean/ABooleanPrinter.java    |  40 ++++
 .../json/clean/ABooleanPrinterFactory.java      |  34 +++
 .../printers/json/clean/ACirclePrinter.java     |  46 ++++
 .../json/clean/ACirclePrinterFactory.java       |  34 +++
 .../printers/json/clean/ADatePrinter.java       |  45 ++++
 .../json/clean/ADatePrinterFactory.java         |  34 +++
 .../printers/json/clean/ADateTimePrinter.java   |  44 ++++
 .../json/clean/ADateTimePrinterFactory.java     |  34 +++
 .../json/clean/ADayTimeDurationPrinter.java     |  45 ++++
 .../clean/ADayTimeDurationPrinterFactory.java   |  34 +++
 .../printers/json/clean/ADoublePrinter.java     |  40 ++++
 .../json/clean/ADoublePrinterFactory.java       |  34 +++
 .../printers/json/clean/ADurationPrinter.java   |  49 +++++
 .../json/clean/ADurationPrinterFactory.java     |  34 +++
 .../printers/json/clean/AFloatPrinter.java      |  40 ++++
 .../json/clean/AFloatPrinterFactory.java        |  34 +++
 .../printers/json/clean/AInt16Printer.java      |  43 ++++
 .../json/clean/AInt16PrinterFactory.java        |  34 +++
 .../printers/json/clean/AInt32Printer.java      |  44 ++++
 .../json/clean/AInt32PrinterFactory.java        |  34 +++
 .../printers/json/clean/AInt64Printer.java      |  41 ++++
 .../json/clean/AInt64PrinterFactory.java        |  34 +++
 .../printers/json/clean/AInt8Printer.java       |  44 ++++
 .../json/clean/AInt8PrinterFactory.java         |  34 +++
 .../printers/json/clean/AIntervalPrinter.java   |  71 ++++++
 .../json/clean/AIntervalPrinterFactory.java     |  34 +++
 .../printers/json/clean/ALinePrinter.java       |  49 +++++
 .../json/clean/ALinePrinterFactory.java         |  34 +++
 .../printers/json/clean/ANullPrinter.java       |  39 ++++
 .../json/clean/ANullPrinterFactory.java         |  34 +++
 .../clean/ANullableFieldPrinterFactory.java     |  67 ++++++
 .../printers/json/clean/AObjectPrinter.java     | 171 +++++++++++++++
 .../json/clean/AObjectPrinterFactory.java       |  34 +++
 .../json/clean/AOrderedlistPrinterFactory.java  |  73 +++++++
 .../printers/json/clean/APoint3DPrinter.java    |  46 ++++
 .../json/clean/APoint3DPrinterFactory.java      |  34 +++
 .../printers/json/clean/APointPrinter.java      |  44 ++++
 .../json/clean/APointPrinterFactory.java        |  34 +++
 .../printers/json/clean/APolygonPrinter.java    |  60 ++++++
 .../json/clean/APolygonPrinterFactory.java      |  34 +++
 .../json/clean/ARecordPrinterFactory.java       |  73 +++++++
 .../printers/json/clean/ARectanglePrinter.java  |  49 +++++
 .../json/clean/ARectanglePrinterFactory.java    |  34 +++
 .../printers/json/clean/AStringPrinter.java     |  45 ++++
 .../json/clean/AStringPrinterFactory.java       |  34 +++
 .../printers/json/clean/ATimePrinter.java       |  45 ++++
 .../json/clean/ATimePrinterFactory.java         |  34 +++
 .../json/clean/AUnionPrinterFactory.java        |  76 +++++++
 .../clean/AUnorderedlistPrinterFactory.java     |  73 +++++++
 .../json/clean/AYearMonthDurationPrinter.java   |  51 +++++
 .../clean/AYearMonthDurationPrinterFactory.java |  37 ++++
 .../printers/json/lossless/ABooleanPrinter.java |  40 ++++
 .../json/lossless/ABooleanPrinterFactory.java   |  34 +++
 .../printers/json/lossless/ACirclePrinter.java  |  46 ++++
 .../json/lossless/ACirclePrinterFactory.java    |  34 +++
 .../printers/json/lossless/ADatePrinter.java    |  45 ++++
 .../json/lossless/ADatePrinterFactory.java      |  34 +++
 .../json/lossless/ADateTimePrinter.java         |  44 ++++
 .../json/lossless/ADateTimePrinterFactory.java  |  34 +++
 .../json/lossless/ADayTimeDurationPrinter.java  |  45 ++++
 .../ADayTimeDurationPrinterFactory.java         |  34 +++
 .../printers/json/lossless/ADoublePrinter.java  |  40 ++++
 .../json/lossless/ADoublePrinterFactory.java    |  34 +++
 .../json/lossless/ADurationPrinter.java         |  49 +++++
 .../json/lossless/ADurationPrinterFactory.java  |  34 +++
 .../printers/json/lossless/AFloatPrinter.java   |  40 ++++
 .../json/lossless/AFloatPrinterFactory.java     |  34 +++
 .../printers/json/lossless/AInt16Printer.java   |  43 ++++
 .../json/lossless/AInt16PrinterFactory.java     |  34 +++
 .../printers/json/lossless/AInt32Printer.java   |  44 ++++
 .../json/lossless/AInt32PrinterFactory.java     |  34 +++
 .../printers/json/lossless/AInt64Printer.java   |  41 ++++
 .../json/lossless/AInt64PrinterFactory.java     |  34 +++
 .../printers/json/lossless/AInt8Printer.java    |  44 ++++
 .../json/lossless/AInt8PrinterFactory.java      |  34 +++
 .../json/lossless/AIntervalPrinter.java         |  71 ++++++
 .../json/lossless/AIntervalPrinterFactory.java  |  34 +++
 .../printers/json/lossless/ALinePrinter.java    |  49 +++++
 .../json/lossless/ALinePrinterFactory.java      |  34 +++
 .../printers/json/lossless/ANullPrinter.java    |  39 ++++
 .../json/lossless/ANullPrinterFactory.java      |  34 +++
 .../lossless/ANullableFieldPrinterFactory.java  |  67 ++++++
 .../printers/json/lossless/AObjectPrinter.java  | 171 +++++++++++++++
 .../json/lossless/AObjectPrinterFactory.java    |  34 +++
 .../lossless/AOrderedlistPrinterFactory.java    |  73 +++++++
 .../printers/json/lossless/APoint3DPrinter.java |  46 ++++
 .../json/lossless/APoint3DPrinterFactory.java   |  34 +++
 .../printers/json/lossless/APointPrinter.java   |  44 ++++
 .../json/lossless/APointPrinterFactory.java     |  34 +++
 .../printers/json/lossless/APolygonPrinter.java |  60 ++++++
 .../json/lossless/APolygonPrinterFactory.java   |  34 +++
 .../json/lossless/ARecordPrinterFactory.java    |  73 +++++++
 .../json/lossless/ARectanglePrinter.java        |  49 +++++
 .../json/lossless/ARectanglePrinterFactory.java |  34 +++
 .../printers/json/lossless/AStringPrinter.java  |  45 ++++
 .../json/lossless/AStringPrinterFactory.java    |  34 +++
 .../printers/json/lossless/ATimePrinter.java    |  45 ++++
 .../json/lossless/ATimePrinterFactory.java      |  34 +++
 .../json/lossless/AUnionPrinterFactory.java     |  76 +++++++
 .../lossless/AUnorderedlistPrinterFactory.java  |  73 +++++++
 .../lossless/AYearMonthDurationPrinter.java     |  51 +++++
 .../AYearMonthDurationPrinterFactory.java       |  37 ++++
 .../asterix/formats/base/IDataFormat.java       |   4 +-
 .../AqlCleanJSONPrinterFactoryProvider.java     | 154 +++++++++++++
 .../AqlJSONPrinterFactoryProvider.java          | 154 -------------
 .../AqlLosslessJSONPrinterFactoryProvider.java  | 154 +++++++++++++
 .../pointables/printer/json/AListPrinter.java   |  86 --------
 .../pointables/printer/json/APrintVisitor.java  | 214 -------------------
 .../pointables/printer/json/ARecordPrinter.java |  92 --------
 .../printer/json/clean/AListPrinter.java        |  81 +++++++
 .../printer/json/clean/APrintVisitor.java       | 214 +++++++++++++++++++
 .../printer/json/clean/ARecordPrinter.java      |  92 ++++++++
 .../printer/json/lossless/AListPrinter.java     |  86 ++++++++
 .../printer/json/lossless/APrintVisitor.java    | 214 +++++++++++++++++++
 .../printer/json/lossless/ARecordPrinter.java   |  92 ++++++++
 .../runtime/formats/NonTaggedDataFormat.java    |  12 +-
 .../testframework/context/TestCaseContext.java  |   9 +-
 .../src/main/resources/Catalog.xsd              |   5 +-
 183 files changed, 5846 insertions(+), 2923 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java b/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
index db6d041..3a33bbe 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/common/APIFramework.java
@@ -324,8 +324,8 @@ public class APIFramework {
         builder.setPredicateEvaluatorFactoryProvider(format.getPredicateEvaluatorFactoryProvider());
 
         switch (conf.fmt()) {
-            case JSON:
-                builder.setPrinterProvider(format.getJSONPrinterFactoryProvider());
+            case LOSSLESS_JSON:
+                builder.setPrinterProvider(format.getLosslessJSONPrinterFactoryProvider());
                 break;
             case CSV:
                 builder.setPrinterProvider(format.getCSVPrinterFactoryProvider());
@@ -333,6 +333,9 @@ public class APIFramework {
             case ADM:
                 builder.setPrinterProvider(format.getADMPrinterFactoryProvider());
                 break;
+            case CLEAN_JSON:
+                builder.setPrinterProvider(format.getCleanJSONPrinterFactoryProvider());
+                break;
             default:
                 throw new RuntimeException("Unexpected OutputFormat!");
         }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/java/org/apache/asterix/api/common/SessionConfig.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/common/SessionConfig.java b/asterix-app/src/main/java/org/apache/asterix/api/common/SessionConfig.java
index 17752a3..4e64802 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/common/SessionConfig.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/common/SessionConfig.java
@@ -32,7 +32,7 @@ import java.util.Map;
  * <li> It also allows you to request additional output for optional
  * out-of-band data about the execution (query plan, etc).
  * <li> It allows you to specify the output format for the primary
- * execution output - JSON, CSV, etc.
+ * execution output - LOSSLESS_JSON, CSV, etc.
  * <li> It allows you to specify output format-specific parameters.
  */
 
@@ -42,8 +42,9 @@ public class SessionConfig {
      */
     public enum OutputFormat {
         ADM,
-        JSON,
-        CSV
+        CSV,
+        CLEAN_JSON,
+        LOSSLESS_JSON
     };
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/APIServlet.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/APIServlet.java b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/APIServlet.java
index 35d4c37..99706ed 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/APIServlet.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/APIServlet.java
@@ -69,9 +69,11 @@ public class APIServlet extends HttpServlet {
         } else if (output.equals("CSV-Header")) {
             format = OutputFormat.CSV;
             csv_and_header = true;
+        } else if (output.equals("LOSSLESS_JSON")) {
+            format = OutputFormat.LOSSLESS_JSON;
         } else {
             // Default output format
-            format = OutputFormat.JSON;
+            format = OutputFormat.CLEAN_JSON;
         }
 
         String query = request.getParameter("query");

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java
index 1091a29..b213bca 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ConnectorAPIServlet.java
@@ -46,7 +46,7 @@ import org.apache.hyracks.dataflow.std.file.FileSplit;
 
 /***
  * The REST API that takes a dataverse name and a dataset name as the input
- * and returns an array of file splits (IP, file-path) of the dataset in JSON.
+ * and returns an array of file splits (IP, file-path) of the dataset in LOSSLESS_JSON.
  * It is mostly used by external runtime, e.g., Pregelix or IMRU to pull data
  * in parallel from existing AsterixDB datasets.
  *

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java
index 4a49dd7..2751945 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/QueryStatusAPIServlet.java
@@ -68,7 +68,7 @@ public class QueryStatusAPIServlet extends HttpServlet {
             JobId jobId = new JobId(handle.getLong(0));
             ResultSetId rsId = new ResultSetId(handle.getLong(1));
 
-            /* TODO(madhusudancs): We need to find a way to JSON serialize default format obtained from
+            /* TODO(madhusudancs): We need to find a way to LOSSLESS_JSON serialize default format obtained from
              * metadataProvider in the AQLTranslator and store it as part of the result handle.
              */
             ResultReader resultReader = new ResultReader(hcc, hds);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
index 314f0e0..7db0c94 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
@@ -66,9 +66,9 @@ abstract class RESTAPIServlet extends HttpServlet {
         throws IOException {
         response.setCharacterEncoding("utf-8");
 
-        // JSON output is the default; most generally useful for a
+        // CLEAN_JSON output is the default; most generally useful for a
         // programmatic HTTP API
-        OutputFormat format = OutputFormat.JSON;
+        OutputFormat format = OutputFormat.CLEAN_JSON;
 
         // First check the "output" servlet parameter.
         String output = request.getParameter("output");
@@ -92,6 +92,13 @@ abstract class RESTAPIServlet extends HttpServlet {
             }
         }
 
+        // If it's JSON, check for the "lossless" flag
+        if (format == OutputFormat.CLEAN_JSON &&
+                ("true".equals(request.getParameter("lossless")) ||
+                (accept != null && accept.contains("lossless=true")))) {
+            format = OutputFormat.LOSSLESS_JSON;
+        }
+
         SessionConfig sessionConfig = new SessionConfig(response.getWriter(), format);
 
         // Now that format is set, output the content-type
@@ -99,7 +106,9 @@ abstract class RESTAPIServlet extends HttpServlet {
             case ADM:
                 response.setContentType("application/x-adm");
                 break;
-            case JSON:
+            case CLEAN_JSON:
+                // No need to reflect "clean-ness" in output type; fall through
+            case LOSSLESS_JSON:
                 response.setContentType("application/json");
                 break;
             case CSV: {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java
index dcfdd97..f5b5cbb 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ShutdownAPIServlet.java
@@ -52,12 +52,12 @@ public class ShutdownAPIServlet extends HttpServlet {
         response.setCharacterEncoding("utf-8");
 
         PrintWriter out = response.getWriter();
-        OutputFormat format = OutputFormat.JSON;
+        OutputFormat format = OutputFormat.LOSSLESS_JSON;
         String accept = request.getHeader("Accept");
         if ((accept == null) || (accept.contains("application/x-adm"))) {
             format = OutputFormat.ADM;
         } else if (accept.contains("application/json")) {
-            format = OutputFormat.JSON;
+            format = OutputFormat.LOSSLESS_JSON;
         }
         StringWriter sw = new StringWriter();
         IOUtils.copy(request.getInputStream(), sw, StandardCharsets.UTF_8.name());

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/java/org/apache/asterix/result/ResultUtils.java
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/java/org/apache/asterix/result/ResultUtils.java b/asterix-app/src/main/java/org/apache/asterix/result/ResultUtils.java
index 9b81ded..44c878d 100644
--- a/asterix-app/src/main/java/org/apache/asterix/result/ResultUtils.java
+++ b/asterix-app/src/main/java/org/apache/asterix/result/ResultUtils.java
@@ -117,9 +117,10 @@ public class ResultUtils {
             case CSV:
                 need_commas = false;
                 break;
-            case JSON:
+            case LOSSLESS_JSON:
+            case CLEAN_JSON:
             case ADM:
-                // Conveniently, JSON and ADM have the same syntax for an
+                // Conveniently, LOSSLESS_JSON and ADM have the same syntax for an
                 // "ordered list", and our representation of the result of a
                 // statement is an ordered list of instances.
                 conf.out().print("[ ");
@@ -167,7 +168,8 @@ public class ResultUtils {
         conf.out().flush();
 
         switch (conf.fmt()) {
-            case JSON:
+            case LOSSLESS_JSON:
+            case CLEAN_JSON:
             case ADM:
                 conf.out().println(" ]");
                 break;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/main/resources/webui/querytemplate.html
----------------------------------------------------------------------
diff --git a/asterix-app/src/main/resources/webui/querytemplate.html b/asterix-app/src/main/resources/webui/querytemplate.html
index 9088251..8308a61 100644
--- a/asterix-app/src/main/resources/webui/querytemplate.html
+++ b/asterix-app/src/main/resources/webui/querytemplate.html
@@ -77,7 +77,7 @@ $(document).ready(function() {
             var errorPattern = /<div class="accordion" id="errorblock">/g;
             var sectionsSeparator = '<h4>';
             var resultPat = 'Results:</h4>';
-            
+
             if (errorPattern.test(data)) {
                 $('#output-heading').html('Error');
                 $('#output-heading').addClass('error');
@@ -210,7 +210,7 @@ $(document).ready(function() {
               <label class="query">Query</label>
               <textarea rows="10" id="qry" name="query" class="query" value="%s" placeholder="Type your AQL query ..."></textarea>
             </div>
-            
+
             <div class="btn-group">
               <button id="checkboxes-on" class="btn">
                   <i id="opts" class="icon-ok" style="display:none;"></i>Select Options</button>
@@ -225,7 +225,8 @@ $(document).ready(function() {
                   <option selected value="ADM">ADM</option>
                   <option value="CSV">CSV (no header)</option>
                   <option value="CSV-Header">CSV (with header)</option>
-                  <option value="JSON">JSON</option>
+                  <option value="CLEAN_JSON">JSON</option>
+                  <option value="LOSSLESS_JSON">JSON (lossless)</option>
                 </select>
               </label>
               <label class="checkbox optlabel"><input type="checkbox" name="print-expr-tree" value="true" /> Print parsed expressions</label>
@@ -260,4 +261,3 @@ $(document).ready(function() {
   </div>
 </body>
 </html>
-

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/test/resources/runtimets/results/json/int01-cleanjson/int01.1.json
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/json/int01-cleanjson/int01.1.json b/asterix-app/src/test/resources/runtimets/results/json/int01-cleanjson/int01.1.json
new file mode 100644
index 0000000..205afcd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/json/int01-cleanjson/int01.1.json
@@ -0,0 +1,8 @@
+[ [ { "int64":
+1
+}
+, { "int64":
+2
+}
+ ] 
+ ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/test/resources/runtimets/results/json/int01-losslessjson/int01.1.json
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/json/int01-losslessjson/int01.1.json b/asterix-app/src/test/resources/runtimets/results/json/int01-losslessjson/int01.1.json
new file mode 100644
index 0000000..18c06b6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/json/int01-losslessjson/int01.1.json
@@ -0,0 +1,8 @@
+[ { "orderedlist": [ { "int64":
+1
+}
+, { "int64":
+2
+}
+ ] }
+ ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/test/resources/runtimets/results/json/int01/int01.1.json
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/json/int01/int01.1.json b/asterix-app/src/test/resources/runtimets/results/json/int01/int01.1.json
deleted file mode 100644
index 18c06b6..0000000
--- a/asterix-app/src/test/resources/runtimets/results/json/int01/int01.1.json
+++ /dev/null
@@ -1,8 +0,0 @@
-[ { "orderedlist": [ { "int64":
-1
-}
-, { "int64":
-2
-}
- ] }
- ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index ba471cb..4dff76b 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -6675,7 +6675,14 @@
     <test-group name="json">
         <test-case FilePath="json">
             <compilation-unit name="int01">
-                <output-dir compare="JSON">int01</output-dir>
+                <output-dir compare="Lossless-JSON">int01-losslessjson</output-dir>
+            </compilation-unit>
+        </test-case>
+    </test-group>
+    <test-group name="cleanjson">
+        <test-case FilePath="json">
+            <compilation-unit name="int01">
+                <output-dir compare="Clean-JSON">int01-cleanjson</output-dir>
             </compilation-unit>
         </test-case>
     </test-group>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-common/src/test/java/org/apache/asterix/test/aql/TestsUtils.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/test/java/org/apache/asterix/test/aql/TestsUtils.java b/asterix-common/src/test/java/org/apache/asterix/test/aql/TestsUtils.java
index ff8bb3d..8ff524e 100644
--- a/asterix-common/src/test/java/org/apache/asterix/test/aql/TestsUtils.java
+++ b/asterix-common/src/test/java/org/apache/asterix/test/aql/TestsUtils.java
@@ -436,7 +436,7 @@ public class TestsUtils {
                                 resultStream = executeAnyAQLAsync(statement, true, fmt);
 
                             if (queryCount >= expectedResultFileCtxs.size()) {
-                                throw new IllegalStateException("no result file for " + testFile.toString());
+                                throw new IllegalStateException("no result file for " + testFile.toString() + "; queryCount: " + queryCount + ", filectxs.size: " + expectedResultFileCtxs.size());
                             }
                             expectedResultFile = expectedResultFileCtxs.get(queryCount).getFile();
 

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ABooleanPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ABooleanPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ABooleanPrinter.java
deleted file mode 100644
index 2374d01..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ABooleanPrinter.java
+++ /dev/null
@@ -1,40 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ABooleanPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ABooleanPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ABooleanPrinterFactory.java
deleted file mode 100644
index 3ead821..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ABooleanPrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ACirclePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ACirclePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ACirclePrinter.java
deleted file mode 100644
index b1e39c1..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ACirclePrinter.java
+++ /dev/null
@@ -1,46 +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.dataflow.data.nontagged.printers.json;
-
-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(", { \"point\": [");
-        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 9));
-        ps.print(", ");
-        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 17));
-        ps.print("] } ] }");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ACirclePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ACirclePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ACirclePrinterFactory.java
deleted file mode 100644
index a849ae2..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ACirclePrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADatePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADatePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADatePrinter.java
deleted file mode 100644
index 2bb1a6d..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADatePrinter.java
+++ /dev/null
@@ -1,45 +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.dataflow.data.nontagged.printers.json;
-
-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;
-
-public class ADatePrinter implements IPrinter {
-
-    private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
-    public static final ADatePrinter INSTANCE = new ADatePrinter();
-
-    @Override
-    public void init() {
-
-    }
-
-    @Override
-    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long chrononTime = AInt32SerializerDeserializer.getInt(b, s + 1) * CHRONON_OF_DAY;
-
-        ps.print("{ \"date\": ");
-        ps.print(chrononTime);
-        ps.print("}");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADatePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADatePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADatePrinterFactory.java
deleted file mode 100644
index 79b17d9..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADatePrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADateTimePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADateTimePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADateTimePrinter.java
deleted file mode 100644
index cc16d76..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADateTimePrinter.java
+++ /dev/null
@@ -1,44 +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.dataflow.data.nontagged.printers.json;
-
-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;
-
-public class ADateTimePrinter implements IPrinter {
-
-    public static final ADateTimePrinter INSTANCE = new ADateTimePrinter();
-
-    @Override
-    public void init() {
-
-    }
-
-    @Override
-    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long chrononTime = AInt64SerializerDeserializer.getLong(b, s + 1);
-
-        ps.print("{ \"datetime\": ");
-        ps.print(chrononTime);
-        ps.print("}");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADateTimePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADateTimePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADateTimePrinterFactory.java
deleted file mode 100644
index 667a01b..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADateTimePrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADayTimeDurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADayTimeDurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADayTimeDurationPrinter.java
deleted file mode 100644
index 7a118da..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADayTimeDurationPrinter.java
+++ /dev/null
@@ -1,45 +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.dataflow.data.nontagged.printers.json;
-
-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;
-
-public class ADayTimeDurationPrinter implements IPrinter {
-
-    public static final ADayTimeDurationPrinter INSTANCE = new ADayTimeDurationPrinter();
-
-    @Override
-    public void init() throws AlgebricksException {
-
-    }
-
-    @Override
-    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 1);
-
-        ps.print("{ \"day-time-duration\": ");
-        ps.print(milliseconds);
-        ps.print("}");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADayTimeDurationPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADayTimeDurationPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADayTimeDurationPrinterFactory.java
deleted file mode 100644
index 8d62c16..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADayTimeDurationPrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADoublePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADoublePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADoublePrinter.java
deleted file mode 100644
index c32bab1..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADoublePrinter.java
+++ /dev/null
@@ -1,40 +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.dataflow.data.nontagged.printers.json;
-
-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));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADoublePrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADoublePrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADoublePrinterFactory.java
deleted file mode 100644
index b481be3..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADoublePrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADurationPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADurationPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADurationPrinter.java
deleted file mode 100644
index b38cd8b..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADurationPrinter.java
+++ /dev/null
@@ -1,49 +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.dataflow.data.nontagged.printers.json;
-
-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.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.data.IPrinter;
-
-public class ADurationPrinter implements IPrinter {
-
-    public static final ADurationPrinter INSTANCE = new ADurationPrinter();
-
-    @Override
-    public void init() {
-
-    }
-
-    @Override
-    public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        int months = AInt32SerializerDeserializer.getInt(b, s + 1);
-        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 5);
-
-        ps.print("{ \"duration\": { ");
-        ps.print("\"months\": ");
-        ps.print(months);
-        ps.print(", \"millis\": ");
-        ps.print(milliseconds);
-        ps.print("} }");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADurationPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADurationPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADurationPrinterFactory.java
deleted file mode 100644
index 5caea8f..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ADurationPrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AFloatPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AFloatPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AFloatPrinter.java
deleted file mode 100644
index c28915f..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AFloatPrinter.java
+++ /dev/null
@@ -1,40 +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.dataflow.data.nontagged.printers.json;
-
-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));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AFloatPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AFloatPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AFloatPrinterFactory.java
deleted file mode 100644
index cb00884..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AFloatPrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt16Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt16Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt16Printer.java
deleted file mode 100644
index fdfabad..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt16Printer.java
+++ /dev/null
@@ -1,43 +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.dataflow.data.nontagged.printers.json;
-
-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;
-
-public class AInt16Printer implements IPrinter {
-    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);
-
-        ps.println("{ \"int16\": ");
-        ps.println(i);
-        ps.println("}");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt16PrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt16PrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt16PrinterFactory.java
deleted file mode 100644
index d95b264..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt16PrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt32Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt32Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt32Printer.java
deleted file mode 100644
index e7b770e..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt32Printer.java
+++ /dev/null
@@ -1,44 +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.dataflow.data.nontagged.printers.json;
-
-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;
-
-public class AInt32Printer implements IPrinter {
-
-    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);
-
-        ps.println("{ \"int32\": ");
-        ps.println(d);
-        ps.println("}");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt32PrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt32PrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt32PrinterFactory.java
deleted file mode 100644
index e715544..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt32PrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt64Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt64Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt64Printer.java
deleted file mode 100644
index ac2ce78..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt64Printer.java
+++ /dev/null
@@ -1,41 +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.dataflow.data.nontagged.printers.json;
-
-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;
-
-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);
-        ps.println("{ \"int64\": ");
-        ps.println(d);
-        ps.println("}");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt64PrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt64PrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt64PrinterFactory.java
deleted file mode 100644
index 270de84..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt64PrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt8Printer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt8Printer.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt8Printer.java
deleted file mode 100644
index e5f3cd1..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt8Printer.java
+++ /dev/null
@@ -1,44 +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.dataflow.data.nontagged.printers.json;
-
-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;
-
-public class AInt8Printer implements IPrinter {
-
-    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);
-
-        ps.println("{ \"int8\": ");
-        ps.println(o);
-        ps.println("}");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt8PrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt8PrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt8PrinterFactory.java
deleted file mode 100644
index 3d52677..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AInt8PrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AIntervalPrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AIntervalPrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AIntervalPrinter.java
deleted file mode 100644
index 8744338..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AIntervalPrinter.java
+++ /dev/null
@@ -1,71 +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.dataflow.data.nontagged.printers.json;
-
-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\": { \"start\": ");
-
-        short typetag = AInt8SerializerDeserializer.getByte(b, s + 1 + 8 * 2);
-
-        IPrinter timeInstancePrinter;
-
-        if (typetag == ATypeTag.DATE.serialize()) {
-            timeInstancePrinter = ADatePrinter.INSTANCE;
-            ((ADatePrinter) timeInstancePrinter).print(b, s + 4, 4, ps);
-            ps.print(", \"end\": ");
-            ((ADatePrinter) timeInstancePrinter).print(b, s + 12, 4, ps);
-        } else if (typetag == ATypeTag.TIME.serialize()) {
-            timeInstancePrinter = ATimePrinter.INSTANCE;
-            ((ATimePrinter) timeInstancePrinter).print(b, s + 4, 4, ps);
-            ps.print(", \"end\": ");
-            ((ATimePrinter) timeInstancePrinter).print(b, s + 12, 4, ps);
-        } else if (typetag == ATypeTag.DATETIME.serialize()) {
-            timeInstancePrinter = ADateTimePrinter.INSTANCE;
-            ((ADateTimePrinter) timeInstancePrinter).print(b, s, 8, ps);
-            ps.print(", \"end\": ");
-            ((ADateTimePrinter) timeInstancePrinter).print(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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AIntervalPrinterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AIntervalPrinterFactory.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AIntervalPrinterFactory.java
deleted file mode 100644
index d889574..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/AIntervalPrinterFactory.java
+++ /dev/null
@@ -1,34 +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.dataflow.data.nontagged.printers.json;
-
-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/f4a1c3c6/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ALinePrinter.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ALinePrinter.java b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ALinePrinter.java
deleted file mode 100644
index 039457a..0000000
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/printers/json/ALinePrinter.java
+++ /dev/null
@@ -1,49 +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.dataflow.data.nontagged.printers.json;
-
-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(" [ { \"point\": [");
-        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 1));
-        ps.print(", ");
-        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 9));
-        ps.print("] }, { \"point\": [");
-        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 17));
-        ps.print(", ");
-        ps.print(ADoubleSerializerDeserializer.getDouble(b, s + 25));
-        ps.print("] } ] }");
-    }
-}



Mime
View raw message