Repository navigation
Include COALESCE in interactive function help - #292
Closed
ryanduguid wants to merge 2 commits into
Closed
ryanduguid wants to merge 2 commits into
ryanduguid wants to merge 2 commits into
Conversation
ryanduguid
marked this pull request as ready for review
September 26, 2026 04:35
dnicolodi
requested changes
Oct 2, 2026
Comment on lines
+709
to
+713
| entries.append(( | ||
| 'coalesce', | ||
| 'Return the first non-NULL argument, or NULL if all arguments are NULL. ' | ||
| 'Arguments must have the same type.', | ||
| 'expr, ...')) |
Collaborator
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.
Author
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.
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.
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.