Adding support for semantic layer apis - #36
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31b2d3448d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| reflection, | ||
| role, | ||
| schema, | ||
| semantic, |
There was a problem hiding this comment.
Include the semantic command module before importing it
Every invocation of the installed dremio entry point imports this name, but a repo-wide search of the committed tree shows no src/drs/commands/semantic.py or generated equivalent. Importing drs.cli therefore raises an ImportError before any command can run; add the command module to this commit or remove its registration.
Useful? React with 👍 / 👎.
| from enum import StrEnum | ||
| from typing import Any | ||
|
|
||
| import pandas as pd |
There was a problem hiding this comment.
Declare pandas before importing it at startup
In a clean installation built from this commit, pandas is absent because it is declared in neither pyproject.toml nor uv.lock. Command modules import drs.output during CLI startup, so this unconditional import raises ModuleNotFoundError even when the user requests JSON output; either add the runtime dependency and update the lockfile or render the table using the already-declared Rich dependency.
Useful? React with 👍 / 👎.
| error("Cannot specify both a SQL argument and --file.") | ||
| raise typer.Exit(1) | ||
| sql = file.read_text().strip() | ||
| if file == '-': |
There was a problem hiding this comment.
Compare the file option against a Path
When a user follows the option help and runs dremio query run --file -, Click converts the value to Path("-"), which is not equal to the string "-". The stdin branch is therefore skipped and file.read_text() attempts to open a literal file named -, usually raising FileNotFoundError; compare with Path("-") or otherwise detect the dash before reading.
Useful? React with 👍 / 👎.
No description provided.