calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <>
Subject Re: About Calcite-1058
Date Tue, 02 Feb 2016 18:10:23 GMT
A slight correction - in (before 1.6) I
only optimized LIMIT 0; I didn’t optimize WHERE FALSE until
(after 1.6).

I pushed 1056 (and also to after release
1.6 because I knew you had run the Hive QA against Calcite’s RC already, and was trying
to avoid screwing up Hive. I didn’t know 1058 would break Hive also. Sorry about that.

I don’t think it would be expensive to use HiveRelBuilder instead of RelBuilder. Instantiate
Hive rules using a factory that creates HiveRelBuilder (the built-in rules use RelBuilder.proto,
which creates a factory that creates a RelBuilder).

Or, probably simpler, continue to create a RelBuilder, but change its valuesFactory to do
something different if there are 0 rows. You probably already have a HiveValuesFactory and
are passing it into your RelBuilderFactory.


> On Feb 1, 2016, at 11:14 PM, Pengcheng Xiong <> wrote:
> Hi all,
>  Calcite-1058 made RelBuilder.filter(false) and RelBuilder.limit(0, 0)
> simplify to empty(), i.e., empty logical values. However, Hive ASTConverter
> is not able to deal with empty logical values. I saw it was resolved in
> Calcite 1.6 but it was not included in the 1.6 snapshot when we tested
> against Hive. I would assume that replacing RelBuilder class with a newly
> created HiveRelBuilder would be expensive. Could you please let me know if
> you have any better ideas? Thanks!
> Best
> Pengcheng

View raw message