calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashutosh Chauhan <hashut...@apache.org>
Subject string literal in where clause
Date Mon, 06 Oct 2014 19:56:59 GMT
create table t1(a varchar(10), b varchar(10));

select * from t1 where 'foo';

Above query compiles and returns null result set on Hive, mysql, sqllite
and fails on compile time on postgres, oracle, MS sql server. On optiq, I
get stack trace listed at bottom. Will it be acceptable to modify Optiq to
accept such queries?

java.lang.AssertionError: condition must be boolean

at org.eigenbase.rex.RexProgram.isValid(RexProgram.java:458)

at org.eigenbase.rex.RexProgram.<init>(RexProgram.java:101)

at
org.eigenbase.rex.RexProgramBuilder.getProgram(RexProgramBuilder.java:396)

at
org.eigenbase.rex.RexProgramBuilder.getProgram(RexProgramBuilder.java:385)

at
org.eigenbase.rex.RexProgramBuilder.getProgram(RexProgramBuilder.java:366)

at
org.eigenbase.relopt.RelOptUtil.pushFilterPastProject(RelOptUtil.java:2296)

at
org.eigenbase.rel.rules.PushFilterPastProjectRule.onMatch(PushFilterPastProjectRule.java:80)

at
org.eigenbase.relopt.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:321)

at org.eigenbase.relopt.hep.HepPlanner.applyRule(HepPlanner.java:488)

at org.eigenbase.relopt.hep.HepPlanner.applyRules(HepPlanner.java:365)

at
org.eigenbase.relopt.hep.HepPlanner.executeInstruction(HepPlanner.java:258)

at
org.eigenbase.relopt.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:68)

at org.eigenbase.relopt.hep.HepPlanner.executeProgram(HepPlanner.java:179)
at org.eigenbase.relopt.hep.HepPlanner.findBestExp(HepPlanner.java:166)

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