[
https://issues.apache.org/jira/browse/CASSANDRA-16479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17298079#comment-17298079
]
Andres de la Peña commented on CASSANDRA-16479:
-----------------------------------------------
Overall the patch looks good to me, with a few comments:
* Perhaps we could add a {{toCQLString}} method to both {{Relation}} and
{{CustomIndexExpression}}. These {{toCQLString}} methods can be called by
{{toString}}. Otherwise future changes can miss that the {{toString}}
implementation is intended to return valid CQL, as it recently happened in
CASSANDRA-16415. Also, calls to {{toCQLString}} should be explicit, whereas
implicit calls to {{toString}} from other {{toCQLString}} methods are a bit
easier to miss.
* I think there are no tests for the changes in
{{CustomIndexExpression}}/{{QualifiedName}}. Creating tests for custom indexes
is tricky, so perhaps that's something we could do in the followup ticket for
{{toCQLString}} methods mentioned in CASSANDRA-16483.
* I'd say the CI results look good. I think [the failure in
{{ViewTest}}|https://app.circleci.com/pipelines/github/blerer/cassandra/110/workflows/9cd65e6d-24f5-455a-9431-815c37c4fab5/jobs/967]
is not related to the changes, and the upgrade tests have failed because the
PR misses the last changes in CircleCI config. We could give it another run
after rebasing.
> 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]