[
https://issues.apache.org/jira/browse/CALCITE-6817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17924826#comment-17924826
]
ZheHu commented on CALCITE-6817:
--------------------------------
It seems RelWriter is a way to go if we want more plan detail to print.
I'm considering adding a new method (call expand()) in RelWriter, and adding a
new toString() method in RelOptUtil that allows user to set expand flag. What
do you guys think?
As you mentioned above, where should I look for "the nullability of fields of
complex types". I assume types like ArraySqlType, MapSqlType and
MultisetSqlType. And what kind of format do you think is suitable? [~mbudiu]
[~suibianwanwan33]
> Add string representation of default nulls direction for RelNode
> ----------------------------------------------------------------
>
> Key: CALCITE-6817
> URL: https://issues.apache.org/jira/browse/CALCITE-6817
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.38.0
> Reporter: ZheHu
> Assignee: ZheHu
> Priority: Minor
> Labels: pull-request-available
>
> Calcite has the same hehavior with Oracle on returning the null direction if
> not specified, which means NULLS LAST is assumed for ASC and NULLS FIRST is
> assumed for DESC.
> However, the default nulls direction is not presented in plan traces. For
> example:
> {code:java}
> select empno from emp order by empno desc
> {code}
> has the following plan:
> {code:java}
> LogicalSort(sort0=[$0], dir0=[DESC])
> LogicalProject(EMPNO=[$0])
> LogicalTableScan(table=[[CATALOG, SALES, EMP]])
> {code}
> It makes RelNode clearer if adding nulls direction, so the above plan will be
> like:
> {code:java}
> LogicalSort(sort0=[$0], dir0=[DESC-nulls-first])
> LogicalProject(EMPNO=[$0])
> LogicalTableScan(table=[[CATALOG, SALES, EMP]])
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)