Add Cassandra system keyspace and virtual view support - #15
Merged
patricklbell merged 15 commits intoMar 10, 2026
Merged
Conversation
- Add VirtualRows struct to engine for non-storage-backed query results - Implement system.local, system.peers, system.peers_v2 virtual tables - Implement system_schema.keyspaces, tables, columns reflecting actual schema - Handle VirtualRows serialization in native protocol layer - Handle system keyspaces in USE statement - Add VirtualRows case to REPL and HTTP modules - Add unit tests for system virtual view queries Co-authored-by: patricklbell <46551885+patricklbell@users.noreply.github.com>
Co-authored-by: patricklbell <46551885+patricklbell@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for Cassandra system keyspace and virtual views
Add Cassandra system keyspace and virtual view support
Mar 8, 2026
Co-authored-by: patricklbell <46551885+patricklbell@users.noreply.github.com>
Co-authored-by: patricklbell <46551885+patricklbell@users.noreply.github.com>
Co-authored-by: patricklbell <46551885+patricklbell@users.noreply.github.com>
…tests - Updated CQL data type definitions to use `dtype::make_native` for consistency. - Modified the `CREATE TABLE` parsing tests to reflect changes in data type representation. - Added a new test for verifying the serialization of collections in the native protocol. - Implemented a new utility function `body_contains_bytes` for checking byte patterns in responses. - Enhanced the dynamic array and map implementations with initializer list support and improved memory management. - Introduced a new `DynamicSet` container with basic operations and iterators. - Added XXHash implementation for efficient hashing in dynamic containers.
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.
Cassandra drivers query
system.local,system.peers, andsystem_schema.*tables during connection setup. Without these, no standard driver can connect to objstore's native protocol.Changes
VirtualRowsresult type — NewResultKind::VirtualRowswithVirtualColumn/VirtualRowstructs inengine.cppmfor query results not backed by btree storageengine.cpp:system.local— single row with cluster name, data center, rack, partitioner, protocol version, etc.system.peers/system.peers_v2— empty (single-node)system_schema.keyspaces/tables/columns— reflect live schema with column kinds and typesappend_result_virtual_rows()innative.cppmserializes virtual rows identically to storage-backed rowsUSE system,CREATE KEYSPACE IF NOT EXISTS systemhandled without touching storageVirtualRowscase added to both output pathsExample
System queries are intercepted in
SelectFrombefore the WHERE/LIMIT assertions, so driver queries likeSELECT * FROM system.local WHERE key='local'work without general WHERE execution support.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
lexy.foonathan.net/usr/local/bin/cmake /usr/local/bin/cmake -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -P /home/REDACTED/work/plexdb/plexdb/build/_deps/lexy-subbuild/lexy-populate-prefix/src/lexy-populate-stamp/download-lexy-populate.cmake(dns block)/usr/local/bin/cmake /usr/local/bin/cmake -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -P /home/REDACTED/work/plexdb/plexdb/build/_deps/lexy-subbuild/lexy-populate-prefix/src/lexy-populate-stamp/download-lexy-populate.cmake conf�� get opulate-prefix/src/lexy-populate-stamp/download-lexy-populate.cmake cal/bin/bash http.https://git/usr/local/bin/ninja(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.