Skip to content

Commit 53c7fd6

Browse files
committed
SchemaParserV4 fixes
1 parent 4561427 commit 53c7fd6

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Bug Fixes
99
Other
1010
-----
1111
* Use global variable for libev loops so it can be subclassed (PYTHON-973)
12+
* Update SchemaParser for V4 (PYTHON-1006)
1213

1314
3.14.0
1415
======

cassandra/metadata.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2415,7 +2415,15 @@ def _schema_type_to_cql(type_string):
24152415

24162416

24172417
class SchemaParserV4(SchemaParserV3):
2418-
pass
2418+
2419+
recognized_table_options = tuple(
2420+
opt for opt in
2421+
SchemaParserV3.recognized_table_options
2422+
if opt not in (
2423+
# removed in V4: CASSANDRA-13910
2424+
'dclocal_read_repair_chance', 'read_repair_chance'
2425+
)
2426+
)
24192427

24202428

24212429
class TableMetadataV3(TableMetadata):

tests/integration/standard/test_metadata.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,10 @@ def test_non_size_tiered_compaction(self):
470470
cql = table_meta.export_as_string()
471471
self.assertIn("'tombstone_threshold': '0.3'", cql)
472472
self.assertIn("LeveledCompactionStrategy", cql)
473-
self.assertNotIn("min_threshold", cql)
474-
self.assertNotIn("max_threshold", cql)
473+
# formerly legacy options; reintroduced in 4.0
474+
if CASSANDRA_VERSION < Version('4.0'):
475+
self.assertNotIn("min_threshold", cql)
476+
self.assertNotIn("max_threshold", cql)
475477

476478
def test_refresh_schema_metadata(self):
477479
"""

0 commit comments

Comments
 (0)