calcite-dev mailing list archives

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

I pushed 1056 (and also https://issues.apache.org/jira/browse/CALCITE-1059) 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.

Julian
 

> On Feb 1, 2016, at 11:14 PM, Pengcheng Xiong <pxiong@apache.org> 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


Mime
View raw message