Include COALESCE in interactive function help - #292
ryanduguid wants to merge 2 commits into
Conversation
| entries.append(( | ||
| 'coalesce', | ||
| 'Return the first non-NULL argument, or NULL if all arguments are NULL. ' | ||
| 'Arguments must have the same type.', | ||
| 'expr, ...')) |
There was a problem hiding this comment.
Special casing coalesce like this is not the way to go. Other similar cases are solved adding a function stub.
There was a problem hiding this comment.
Replaced the shell special case with a query_env.coalesce documentation stub using the existing @function pattern. Its docstring records the multiple-argument and common-type requirements; compilation uses EvalCoalesce. All 294 tests, Ruff, both coverage gates and the package builds pass on Linux with Python 3.11 and Beancount 3.2.3.
|
Upstream CI expired while waiting for workflow approval. The test run created no jobs and reports: "This workflow run required approval but was not approved before it expired." The updated branch passes all 23 fork checks, with deployment skipped. Please rerun and approve the upstream workflows for 2a715f1. |
Summary
Include COALESCE in
.help targets,.help fromand.help wherethrough a documentation stub inquery_env.py, following the existing function registry pattern. The compiler evaluates it throughEvalCoalesce; its docstring describes multiple arguments, NULL handling and the common-type requirement.Closes #284.
Evidence
coalesce(any)once in each topic, outside the aggregate section.PLR0917annotations from Report invalid source schemes as OperationalError #296 for the established renderer and command signatures. The new Ruff release otherwise flags these unchanged signatures.Merge danger
Door: reversible. Blast radius: interactive help.
COALESCE appears through the same registry as the other documented functions.
Unverified
Upstream checks and maintainer review remain outstanding. The Windows full suite has three temporary-file handle errors and one CSV newline failure. Aikido could not connect, so its scan is unverified.