catap / jaql

Jaql is a query language designed for Javascript Object Notation (JSON), a data format that has become popular because of its simplicity and modeling flexibility. Jaql is primarily used to analyze large-scale semi-structured data. Core features include user extensibility and parallelism. In addition to modeling semi-structured data, JSON simplifies extensibility. Hadoop's Map-Reduce is used for parallelism.
2 stars 0 forks source link

Explain should not be printed out as a JSON string. #68

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Explain's output is already fairly complicated. Placing it in a JsonString 
and printing it out as a JSON value does not help the situation since 
newlines are quoted. Example: 

jaql> [1,2,3] -> write(hdfs("/tmp/foo"));
{
  "location": "/tmp/foo",
  "type": "hdfs"
}

jaql> explain read(hdfs("/tmp/foo")) -> filter $ > 2;
"(\n  $fd_0 = system::mapReduce({ (\"input\"):(system::const({\r\n    
\"location
\": \"/tmp/foo\",\r\n    \"type\": \"hdfs\"\r\n  })), (\"map\"):(fn(schema 
[\r\n
         any<0,*>\r\n       ] $mapIn) ($mapIn\n-> filter each $ ($) > (2)
\n-> tr
ansform each $fv ([null, $fv]))), (\"schema\"):({ (\"key\"):(schema null), 
(\"va
lue\"):(schema any) }), (\"output\"):(system::HadoopTemp()) }),\n  
system::read(
$fd_0)\n)\r\n"

jaql>

Enough said...

This needs to printed to the output in an unquoted form.

Original issue reported on code.google.com by vuk.erce...@gmail.com on 22 Oct 2009 at 5:47

GoogleCodeExporter commented 8 years ago
Fixed in Revision 413. Fix in Revision 412 don't not print a new line when 
printing
the evaluated result of an explain expr. 

Original comment by yaojingguo@gmail.com on 23 Oct 2009 at 2:33