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
{{ message }}
Repository navigation
engine: let infoctl query list tables with show tables #97
infoctl query gives an analyst no way to see what is in the warehouse. The query session is a plain SessionContext::new() (crates/engine/src/lib.rs:28 at b3017eb on PR #46's branch), so DataFusion's information_schema is off, and show tables, show columns from ready.daily_revenue and select * from information_schema.tables all fail with "not supported unless information_schema is enabled" or "not found". The only listing today is the error for an unknown table, which names the tables that exist. Turn the schema on with SessionConfig::new().with_information_schema(true) when the context is built; it adds read-only virtual tables and changes nothing about the SQLOptions guard, which keeps rejecting writes. Because every layer is registered twice, under its namespace and its alias (gold and ready), each table will appear twice; either keep both rows and say so in the usage text, or hide the alias schemas from the listing. #95 (the QueryContext) must keep the setting when it rebuilds the session.
Crates:crates/engine (src/lib.rs and tests/query.rs), crates/cli (USAGE in src/lib.rs if the usage text changes)
Done when
show tables through infostash_engine::query returns a row for daily_revenue, and infoctl query "show tables" prints it and exits 0; the decision about the duplicate alias rows is written in the usage text or the code.
show columns from ready.daily_revenue returns the table's columns and types.
select table_schema, table_name from information_schema.tables where table_schema = 'gold' returns the table.
The existing tests for rejected writes still pass.
Each case above is a test that fails when with_information_schema(true) is removed.
Activity
feat(cli): infoctl query runs read-only SQL against the warehouse (#46)