[
https://issues.apache.org/jira/browse/CASSANDRA-17919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714119#comment-17714119
]
Stefan Miklosovic edited comment on CASSANDRA-17919 at 4/19/23 2:11 PM:
------------------------------------------------------------------------
Thanks.
It looks just fine. I noticed there there is also this in the wiki
_The smallest value used may also have a decimal fraction,[38] as in "P0.5Y" to
indicate half a year. This decimal fraction may be specified with either a
comma or a full stop, as in "P0,5Y" or "P0.5Y"._
We do not implement this. This ticket is not to blame, I am just writing what I
see. I looked into the code and it would be quite challenging to support this
format. The values are based on an integer only.
I am +1, I need to find another committer and we may build it all afterwards as
it spans 4 branches.
The sneak peek of the builds is here, for trunk j8 pre-commit, I will build the
rest afterwards to save the resources and time:
https://app.circleci.com/pipelines/github/instaclustr/cassandra/2105/workflows/c50c15aa-8e27-4fd6-b4cc-5a216ed115d6
[~dcapwell] [~e.dimitrova] [~blerer] [~brandon.williams]
was (Author: smiklosovic):
Thanks.
It looks just fine. I noticed there there is also this in the wiki
_The smallest value used may also have a decimal fraction,[38] as in "P0.5Y" to
indicate half a year. This decimal fraction may be specified with either a
comma or a full stop, as in "P0,5Y" or "P0.5Y"._
We do not implement this. This ticket is not to blame, I am just writing what I
see. I looked into the code and it would be quite challenging to support this
format. The values are based on an integer only.
I am +1, I need to find another committer and we may build it all afterwards as
it spans 4 branches.
The sneak peek of the builds is here, for trunk j8 pre-commit, I will build the
rest afterwards to save the resources and time:
https://app.circleci.com/pipelines/github/instaclustr/cassandra/2105/workflows/c50c15aa-8e27-4fd6-b4cc-5a216ed115d6
> Capital P gets confused in the parser for a Duration in places where IDENT
> are needed
> -------------------------------------------------------------------------------------
>
> Key: CASSANDRA-17919
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17919
> Project: Cassandra
> Issue Type: Bug
> Components: CQL/Syntax
> Reporter: David Capwell
> Assignee: Maxim Chanturiay
> Priority: Normal
> Fix For: 3.11.x, 4.0.x, 4.1.x, 5.x
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> This was found while adding Accord Transaction syntax into CQL and fuzz
> testing to validate all possible cases… in doing this the following was found
> {code}
> String query = "BEGIN TRANSACTION\n" +
> " LET P = (SELECT v FROM " + keyspace + ".tbl
> WHERE k=? AND c=?);\n" +
> " LET row2 = (SELECT v FROM " + keyspace + ".tbl
> WHERE k=? AND c=?);\n" +
> " SELECT v FROM " + keyspace + ".tbl WHERE k=?
> AND c=?;\n" +
> " IF P IS NULL AND row2.v = ? THEN\n" +
> " INSERT INTO " + keyspace + ".tbl (k, c, v)
> VALUES (?, ?, ?);\n" +
> " END IF\n" +
> "COMMIT TRANSACTION";
> {code}
> Fails with
> {code}
> SyntaxException: line 2:6 mismatched input 'P' expecting IDENT (BEGIN
> TRANSACTION LET [P]...)
> {code}
> The new LET syntax found this, but was able to reproduce in other cases
> {code}
> cqlsh:ks> CREATE TABLE P (k INT PRIMARY KEY);
> SyntaxException: line 1:13 no viable alternative at input 'P' (CREATE TABLE
> [P]...)
> cqlsh:ks>
> cqlsh:ks> CREATE TABLE p (k INT PRIMARY KEY);
> cqlsh:ks>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]