Clickhouse: Error with VIEW and enable_optimize_predicate_expression

Created on 12 Sep 2018  Â·  4Comments  Â·  Source: ClickHouse/ClickHouse

If option enable_optimize_predicate_expression = 1 and tables like this

DROP TABLE IF EXISTS test1
DROP TABLE IF EXISTS test2
CREATE TABLE test1 (_id String) ENGINE=Memory
CREATE TABLE test2 (_id String, userId String) ENGINE=Memory
CREATE VIEW IF NOT EXISTS test2_view AS SELECT * FROM test2

so query

SELECT * FROM test2_view AS t2 ALL INNER JOIN ( SELECT * FROM test1 AS t1 ) AS t3 ON (t3._id = t2.userId)

return error
Unknown identifier: t2.userId

If enable_optimize_predicate_expression = 0 - the query is ok

comp-optimizers

All 4 comments

thank you, view predicate optimization has a logical error, and I'm fixing that : )

Thank you too. Could you tell me, when I can get this fix in stable?

We will try to prepare the next release at the end of this week or on next week.

Was this page helpful?
0 / 5 - 0 ratings