calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juhwan Kim <jh3...@gmail.com>
Subject A question about subquery output format
Date Thu, 28 May 2020 22:58:01 GMT
Hello,

When there is a subquery in a plan, it looks like RelWriter always prints
the subquery without any indentation. Although this makes subquery
recognizable in most cases, I think it would become easier to read and look
better if we write the subquery with two more indentations than its rel,
and I think this format also corresponds to how we write code in Calcite.
Any thoughts about this? I added some example below.

This is the current representation of a plan with subquery:

LogicalProject("K0"=[$0], ...)
  LogicalFilter(condition=[IN($4, {
LogicalProject(C0=[$5])
  LogicalTableScan(table=[[CATALOG, STRUCT, T]])
})])
    LogicalTableScan(table=[[CATALOG, STRUCT, T]])

After the change, it would look like this:

LogicalProject("K0"=[$0], ...)
  LogicalFilter(condition=[IN($4, {
      LogicalProject(C0=[$5])
        LogicalTableScan(table=[[CATALOG, STRUCT, T]])
      })])
    LogicalTableScan(table=[[CATALOG, STRUCT, T]])

Best,
Juhwan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message