calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Haidai <anton.hai...@gmail.com>
Subject Is it possible to define an empty LogicalValues node using SQL?
Date Fri, 17 May 2019 15:05:58 GMT
Hello,
I'm trying to reproduce a tricky bug in RelOptRulesTest. It requires
an empty LogicalValues with a desired row type to be a direct input of
a join. I can achieve the desired structure using RelBuilder and
LogicalValues.createEmpty(), however, I can't reproduce it in test's
SQL. For example, SQL "select 42 sal, 'Bobby' ename LIMIT 0" produces
the following logical plan:

LogicalSort(fetch=[0])
  LogicalValues(tuples=[[]])

But I need only the LogicalValues node, without LogicalSort or any
other nodes on top of it.
I have a workaround that replaces the nodes by means of a dedicated
rule in preProgram, but this solution looks really poor.

Possibly, there is some trick to define just an empty LogicalValues
with a desired row type using SQL only?

-- 
Best regards,
Anton.

Mime
View raw message