Currently the main query-processing entry point accepts an
APIFramework.OutputFormat to determine what kind of output to produce: ADM,
JSON, or CSV. It can also support HTML, but this is strictly for the use of the
web interface; the actual output is ADM, with some HTML wrappers.
There is other code throughout APIFramework that handles extra output such as
the logical plan, rewritten expressions, and so on (via flags in the
SessionConfig object). Those only make sense if the OutputFormat is HTML, in
which case they are wrapped in <pre> blocks which the web interface's CSS
formats nicely. If you select any of this extra output with any other output
format, the output will be invalid.
It should be possible to get this additional output "out of band", rather than
streamed to the same PrintWriter. This would allow the HTML formatting to be
relocated inside the web interface itself, where it belongs. It would also make
it trivially possible for the web interface to display JSON or CSV in addition
to ADM.
Original issue reported on code.google.com by c...@lambda.nu on 14 Nov 2014 at 10:02
Original issue reported on code.google.com by
c...@lambda.nu
on 14 Nov 2014 at 10:02