fix(lakehouse): allow append task without append row flags#19
Open
francoischalifour wants to merge 3 commits into
Open
fix(lakehouse): allow append task without append row flags#19francoischalifour wants to merge 3 commits into
francoischalifour wants to merge 3 commits into
Conversation
Contributor
|
I had to dig the codebase to know about It may be just me, but I just don't see the use-case in the CLI, or at least I wouldn't suspect this form? |
Member
Author
|
I was aiming for OpenAPI parity — thought it would make sense to get a task status from the command-line. I haven't played with it much so no strong feeling whether it should be promoted in the CLI. |
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.
The
appendcommand has two public forms:The second form is documented and listed in the command help, but the command group previously reused the required append-run arguments at the parent level. That meant
altertable append task <task-id>could be blocked by missing run-only flags such as--catalog,--schema,--table, and--databefore the CLI reached thetasksubcommand.While improving tests, also found some lakehouse tests were coupled to implementation details like operation plans and request-builder return objects. Those tests were refactored toward command-level behavior so they better survive internal refactors.
Proposed Solution
This branch changes
appendcommand wiring so the parent command keeps optional versions of the append-run flags, while therunleaf still owns the required validation. This preserves the shorthand default form:altertable append --catalog memory --schema main --table users --data '{"id":1}'and allows the documented task form to work independently:
The lakehouse tests now exercise public CLI behavior through the command runtime and mock HTTP logging instead of calling lower-level request builders directly.
A new shell-level test,
tests/lakehouse_test.sh, covers:appenddefaulting to the run command.append task <task-id>fetching task status without requiring append-run flags.The new shell test is included in the standard
./scripts/verify.shoffline test loop.