[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16162195#comment-16162195 ] Jason Brown commented on CASSANDRA-13717: - backported the patch to 3.0 and 3.11, and running tests now: ||3.0||3.11||trunk|| |[branch|https://github.com/jasobrown/cassandra/tree/13717-3.0]|[branch|https://github.com/jasobrown/cassandra/tree/13717-3.11]|[branch|https://github.com/jasobrown/cassandra/tree/13717-trunk]| |[dtest|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/298/]|[dtest|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/299/]|[dtest|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/300/]| |[utests|https://circleci.com/gh/jasobrown/cassandra/tree/13717-3.0]|[utests|https://circleci.com/gh/jasobrown/cassandra/tree/13717-3.11]|[utests|https://circleci.com/gh/jasobrown/cassandra/tree/13717-trunk]| > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Components: Core, CQL > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos >Priority: Critical > Fix For: 3.0.x, 3.11.x, 4.x > > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16162134#comment-16162134 ] Jason Brown commented on CASSANDRA-13717: - This bug exists in 3.0, as well - perhaps earlier, but even if it does this doesn't meet the bar of being 'critical' to patch 2.x for. > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Components: Core, CQL > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos >Priority: Critical > Fix For: 3.0.x, 3.11.x, 4.x > > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16134567#comment-16134567 ] Stavros Kontopoulos commented on CASSANDRA-13717: - [~jjirsa] Any update or something I should do? > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos >Priority: Critical > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16121536#comment-16121536 ] Stavros Kontopoulos commented on CASSANDRA-13717: - I added a test there in TupleTypeTest, updated the branch. > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos >Priority: Critical > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16121472#comment-16121472 ] Stavros Kontopoulos commented on CASSANDRA-13717: - [~jjirsa] I fixed for trunk (version 4). I could backport it to 3.11 (version reported) as soon as it is verified that this fix is ok. Good to know about the test procedure thanx a lot. I will check the unit tests. > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos >Priority: Critical > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16121048#comment-16121048 ] Jeff Jirsa commented on CASSANDRA-13717: [~skonto] - do you know which versions need to be fixed? 3.0? 3.11? trunk? I've kicked off some test builds [here (unit tests)|https://circleci.com/gh/jeffjirsa/cassandra/tree/cassandra-13717] and [here (dtest)|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/173] - we'll want to do that for each branch that needs this fix (and of course, we'll want to add tests to this fix as well). > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos >Priority: Critical > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120965#comment-16120965 ] Jeff Jirsa commented on CASSANDRA-13717: I typically prefer keeping them in unit tests (junit tests in the same repo, check out the test/ directory). There should be a section for cql3 tests, and almost certainly a TupleTest within it that you can add a function or two to. > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos >Priority: Critical > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120960#comment-16120960 ] Stavros Kontopoulos commented on CASSANDRA-13717: - Thnx [~jjirsa] ! Here is my branch: https://github.com/skonto/cassandra/tree/cassandra-13717. As for the test case I read the contribution wiki etc... still a bit confused where should I add it? In dtests or just part of the patch? > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos >Priority: Critical > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120932#comment-16120932 ] Jeff Jirsa commented on CASSANDRA-13717: Welcome [~skonto] ! Next step would be to assign yourself (I've done that for you), and then hit 'submit patch' to mark the issue as patch available (I've done that for you again). We typically ask either the contributor (you) or the reviewer (someone who will volunteer, hopefully soon) to push the patch to a github branch and kick off CI (we have it setup to use circleci for unit tests, and a committer can kick off dtests). We typically ask that your patch includes a test case that fails before your patch and succeeds after it's applied, so while this is not a review, I will say that any reviewer should ask you to do that. > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis >Assignee: Stavros Kontopoulos > Attachments: example_queries.cql, fix_13717 > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120927#comment-16120927 ] Stavros Kontopoulos commented on CASSANDRA-13717: - I have created a patch and verified Jeff's suggestion: [patch title|https://drive.google.com/open?id=0B0SeiqgJaLZvclhmY0N4dEJtUGs] > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis > Attachments: example_queries.cql > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16096873#comment-16096873 ] Jeff Jirsa commented on CASSANDRA-13717: There are a bunch of cases in {{Tuples.java}} where we check {{instanceof TupleType}} that are probably wrong in the case that it's Reversed. I suspect we should be checking if the {{baseType}} (which is already public) of the {{ReversedType}} is a Tuple. > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis > Attachments: example_queries.cql > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13717) INSERT statement fails when Tuple type is used as clustering column with default DESC order
[ https://issues.apache.org/jira/browse/CASSANDRA-13717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16096262#comment-16096262 ] Anastasios Kichidis commented on CASSANDRA-13717: - After some quick debugging I saw that this error is thrown because of the tuple validation on Tuples.java: {noformat} if (!(receiver.type instanceof TupleType)) throw invalidRequest("Invalid tuple type literal for %s of type %s", receiver.name, receiver.type.asCQL3Type()); {noformat} When the default ordering on tuple is DESC, the *receiver.type* is instance of type *ReversedType* and not *TupleType* . However, I don't have the expertise to know the cause of this. > INSERT statement fails when Tuple type is used as clustering column with > default DESC order > --- > > Key: CASSANDRA-13717 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13717 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.11 >Reporter: Anastasios Kichidis > Attachments: example_queries.cql > > > When a column family is created and a Tuple is used on clustering column with > default clustering order DESC, then the INSERT statement fails. > For example, the following table will make the INSERT statement fail with > error message "Invalid tuple type literal for tdemo of type > frozen>" , although the INSERT statement is correct > (works as expected when the default order is ASC) > {noformat} > create table test_table ( > id int, > tdemo tuple , > primary key (id, tdemo) > ) with clustering order by (tdemo desc); > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org