You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Various correctness, robustness, and performance fixes
Validation and routing:
- Add word-boundary checks to command validation so DESCRIBING/SELECTS/
INSERTION etc. no longer match DESCRIBE/SELECT/INSERT prefixes
- Rewrite stripComments in router and batch/utils to respect quoted
strings (was corrupting URLs and SQL with -- inside quotes)
- Use db.ConvertToJSONQuery for SELECT->SELECT JSON transform so
SELECT DISTINCT is handled correctly
UDT decoder:
- Treat empty wire data for text/varchar/ascii as empty string and
empty blob as []byte{}, instead of nil. Cassandra signals null with
a -1 length prefix, not zero-length payload
- Drop defensive overflow checks on smallint/int/bigint that are
impossible by two's-complement decoding; annotate with nolint:gosec
- Fix DATE encoding test: Cassandra DATE is days_since_epoch + 2^31,
not raw int32. Add pre-epoch test case
Config robustness:
- Add OutputFormat field so default format can be set in config
- Surface cqlshrc permission/parse errors via LoadWarnings instead of
silent swallowing
- Resolve relative credentials = path against the cqlshrc dir, not CWD
- Mask password/api/secret keys in debug logs; stop logging raw
credentials-file lines
Session manager:
- SetKeyspace and SetOutputFormat now return error
- Validate keyspace name against ^[a-zA-Z_][a-zA-Z0-9_]*$
- Read default OutputFormat from config
DB session/executor:
- Read pageSize from config (was hardcoded 100)
- Remove bogus close-iterator-then-recreate dance from
ExecuteSelectQuery that always ran the query twice
Batch:
- Quote-aware splitter and comment stripper (handles ''-escapes and
BATCH boundaries)
- Precompute column-name index map in CSV output (O(rows*cols)
instead of O(rows*cols^2))
AI:
- Validate extracted JSON with json.Valid; add extractBalancedJSON to
match nested objects instead of LastIndex("}")
- Bound conversation cache to 100 entries with 24h TTL eviction
- Debounce search-index "last accessed" updates (every 30s, batched)
instead of one goroutine per match
- Switch ai_handler to NewAIWithCache
Parquet/COPY:
- Sort partition column names so output is deterministic across runs
- Track partition file size from disk after Flush for accurate
maxFileSize accounting
- Fix COPY header-row leak: skip Data[0] which contains headers
- Narrow UUID heuristic to "name contains uuid" only; "id" was a
false positive for columns like provider_id, valid
UI:
- sliding_window MaxRows=0 now means unlimited (memory limit only)
- Log SetKeyspace error after the new error return
Meta-commands:
- PAGING OFF now sets pageSize to 0 (server defaults) instead of
10000, in both code paths
Add AGENTS.md repository contributor guide
Add tests for batch/utils, db/session, and validation/command
0 commit comments