Add functionalities#10
Merged
Merged
Conversation
…nd validation; add tests for COUNT, SUM, and error scenarios.
…ry parsing; refactor tests to include new scenarios.
…auses; implement COUNT(DISTINCT) and AVG functions; refactor tests to cover new scenarios.
…ove WHERE clause substitution, and add support for HAVING conditions; implement distinct clause extraction and validation for aggregates.
…data classes, improve CREATE TABLE parsing to support composite keys and clustering orders, and add tests for composite primary key metadata.
…, select, and delete operations; add tests for TTL expiration and timestamp precedence.
…rations to support IF conditions; add tests for conditional inserts, updates, and deletes.
…ews in INSERT, UPDATE, and DELETE operations; add tests for materialized view consistency across data modifications.
… operations with improved condition checks, row management, and TTL support; add tests for TTL and writetime functions in SELECT queries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and refactors to the mock ScyllaDB implementation, focusing on more robust parsing and handling of primary keys, clustering orders, and lightweight transaction (LWT) conditions. It also enhances the parsing of CQL statements and improves the accuracy of table metadata representation. The most significant changes are grouped below:
Primary Key and Clustering Order Handling:
mockylla/parser/create.py,mockylla/classes/metadata.py,mockylla/classes/state.py).CQL Statement Parsing Improvements:
CREATE TABLE,INSERT,SELECT,UPDATE, andDELETEstatements to better support CQL syntax, including optional clauses and more flexible LIMIT expressions (mockylla/parser/__init__.py).Lightweight Transaction (LWT) and Conditional Deletes:
DELETEstatement handler to support conditional deletes using LWT (IF,IF EXISTS,IF NOT EXISTS), including proper result row generation and integration with materialized view rebuilding (mockylla/parser/delete.py).Expired Row Purging:
mockylla/classes/state.py).Code Structure and Utility Improvements:
mockylla/parser/create.py,mockylla/parser/delete.py).These changes collectively improve the accuracy, maintainability, and feature completeness of the mock ScyllaDB engine, especially around schema handling and query parsing.