Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cqlengine tests are failing when scylla 5.2 and up is used [Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY] #343

Open
fruch opened this issue Jul 2, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@fruch
Copy link

fruch commented Jul 2, 2024

seems like this change shoved away those tests with the @requirescollectionindexes

and we weren't running them with scylla 5.1

but those two still fails, and need to be investigated:

  • FAILED tests/integration/cqlengine/query/test_queryset.py::TestQuerySetOrdering::test_order_by_success_case - cassandra.InvalidRequest: Error from server: code=2200 [Invalid query] message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
  • FAILED tests/integration/cqlengine/test_connections.py::TestQuerySetOrderingNoDefault::test_order_by_success_case - cassandra.InvalidRequest: Error from server: code=2200 [Invalid query] message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
@fruch fruch changed the title two cqlengine tests are failing when scylla 5.2 and up is used [Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY] cqlengine tests are failing when scylla 5.2 and up is used [Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY] Jul 2, 2024
@fruch fruch added the bug Something isn't working label Jul 2, 2024
fruch added a commit to fruch/python-driver that referenced this issue Jul 4, 2024
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
@fruch
Copy link
Author

fruch commented Jul 4, 2024

the test model is:

class TestModel(Model):

    test_id = columns.Integer(primary_key=True)
    attempt_id = columns.Integer(primary_key=True)
    description = columns.Text()
    expected_result = columns.Integer()
    test_result = columns.Integer()

the schema:

CREATE TABLE cqlengine_test.test_model (
    test_id int,
    attempt_id int,
    description text,
    expected_result int,
    test_result int,
    PRIMARY KEY (test_id, attempt_id)
) WITH CLUSTERING ORDER BY (attempt_id ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'class': 'SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

and this is the query

q = TestModel.objects(test_id=0).order_by('attempt_id')
# SELECT "attempt_id", "description", "expected_result", "test_result" FROM cqlengine_test.test_model WHERE "test_id" = %(0)s ORDER BY "attempt_id" ASC LIMIT 10000

@fruch
Copy link
Author

fruch commented Jul 4, 2024

@nyh can you give me a hand understanding this one ?

is that a scylla limitation ? is there a way around it ? is this limitation documented anywhere ?

fruch added a commit to fruch/python-driver that referenced this issue Jul 4, 2024
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
@Lorak-mmk
Copy link

@nyh ping

dkropachev pushed a commit to dkropachev/python-driver that referenced this issue Aug 9, 2024
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
dkropachev pushed a commit to dkropachev/python-driver that referenced this issue Aug 15, 2024
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
dkropachev pushed a commit to dkropachev/python-driver that referenced this issue Aug 15, 2024
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
dkropachev pushed a commit to dkropachev/python-driver that referenced this issue Nov 10, 2024
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
dkropachev pushed a commit to dkropachev/python-driver that referenced this issue Nov 18, 2024
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
dkropachev pushed a commit to dkropachev/python-driver that referenced this issue Nov 18, 2024
test is failing with the following:
```
cassandra.InvalidRequest: Error from server: code=2200 [Invalid query]
message="Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY"
```

seems like scylla doesn't support ordering by clustering keys

Ref: scylladb#343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants