[ 
https://issues.apache.org/jira/browse/CASSANDRA-16479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17296221#comment-17296221
 ] 

Benjamin Lerer commented on CASSANDRA-16479:
--------------------------------------------

CASSANDRA-13426 changed the way the Materialized Views WHERE clause stored in 
{{system_schema.views}} was generated. The code used to generate the WHERE 
clause text was not relying on method quoting identifiers when needed.

[PR|https://github.com/apache/cassandra/pull/916] CI: 
[j8|https://app.circleci.com/pipelines/github/blerer/cassandra/110/workflows/3fa3e242-3164-4757-b18f-14e4682f383f],
 
[j11|https://app.circleci.com/pipelines/github/blerer/cassandra/110/workflows/9cd65e6d-24f5-455a-9431-815c37c4fab5]




> Materialized Views: incorrect where clause reported for quoted identifiers
> --------------------------------------------------------------------------
>
>                 Key: CASSANDRA-16479
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16479
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Syntax, Feature/Materialized Views
>            Reporter: Alexandre Dutra
>            Assignee: Benjamin Lerer
>            Priority: Normal
>             Fix For: 4.0-rc
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I believe this is a regression from 3.11.
> Given the following schema:
> {noformat}
> CREATE TABLE t1 ("theKey" int, "theClustering" int, "theValue" int, PRIMARY 
> KEY ("theKey", "theClustering"));
> CREATE MATERIALIZED VIEW mv1 AS SELECT * FROM t1 WHERE "theKey" IS NOT NULL 
> AND "theClustering" IS NOT NULL AND "theValue" IS NOT NULL  PRIMARY KEY 
> ("theKey", "theClustering");
> {noformat}
> And given the following query:
> {noformat}
> SELECT where_clause FROM system_schema.views ;
> {noformat}
> With 3.11, I get:
> {noformat}
> "theKey" IS NOT NULL AND "theClustering" IS NOT NULL AND "theValue" IS NOT 
> NULL
> {noformat}
> But with current trunk, I get:
> {noformat}
> theKey IS NOT NULL AND theClustering IS NOT NULL AND theValue IS NOT NULL
> {noformat}
> Note how column names appear in their internal format, not in quoted form.
> Note: the DataStax drivers rely on this info to rebuild the view's DDL query 
> client-side; generated CQL is currently broken with Cassandra 4.0-trunk.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to