generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
The format query parameter in the explain API is currently overloaded to serve two distinct purposes:
- Output format control (JSON, CSV, YAML) - controls how the response is serialized
- Explain verbosity level (SIMPLE, STANDARD, EXTENDED, COST) - controls the content/detail level of the explain output
This violates the single responsibility principle and creates confusion, as FORMAT should only control the serialization format of the response, not the semantic content.
Proposal
Introduce a new query parameter (e.g., explain_level, explain_option, or verbosity) specifically for controlling the explain verbosity, while keeping format strictly for output serialization format.
Current behavior:
/_plugins/_ppl/_explain?format=extended // controls BOTH verbosity AND output format
Proposed behavior:
/_plugins/_ppl/_explain?format=json&explain_level=extended // separate concerns
/_plugins/_ppl/_explain?format=yaml&explain_level=standard
Context
This issue was identified during code review of PR #4914 (RexCall and RelDataType standardization for script push down).
Related discussion: #4914 (comment)
Benefits
- Clear separation of concerns: FORMAT controls serialization, explain option controls content
- Better API design: Each parameter has a single, well-defined responsibility
- Improved extensibility: Easier to add new output formats or explain levels independently
- Reduced confusion: Users understand what each parameter does
Implementation considerations
- Maintain backward compatibility by supporting the old format parameter behavior
- Add deprecation warnings for the old usage pattern
- Update documentation to reflect the new parameter
- Update integration tests
Reported by: @qianheng-aws
qianheng-aws
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request