GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — [coverage] Conformance findings: PARAMQUERY-021 (#901) by peco-engineer-bot[bot] · Pull Request #1006 · databricks/databricks-sql-python Conversation
Contributor
SummaryAutomated fix for #901 — [coverage] Conformance findings: PARAMQUERY-021. I fixed Root cause & planRoot cause: In src/databricks/sql/parameters/native.py, DecimalParameter._cast_expr() builds the cast string as CAST_EXPR.format(self.scale, self.precision), i.e. "DECIMAL(scale,precision)". SQL wants DECIMAL(precision,scale). The constructor docstring also mixes up the two names: it calls
Files changed
Test plan
🤖 Generated by engineer-bot (bug-fix flow) — review before merge.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsSigned-off-by: peco-engineer-bot[bot] <3815206+peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 High · 2 Medium · 1 Nit Fixes the swapped Other findings
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Addresses: - #4418237463 at src/databricks/sql/parameters/native.py:642 - #4418237473 at src/databricks/sql/parameters/native.py:650 - #4418237477 at tests/unit/test_parameters.py:113 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Medium · 2 Nit The fix is correct: the cast now sends DECIMAL(precision, scale), Other findings
When capping, shrink the declared scale back toward
Either soften the wording ("up to the 38-digit maximum, for
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Addresses: - #4418299211 at src/databricks/sql/parameters/native.py:641 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Medium · 2 Low The fix itself looks right:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Addresses: - #4418440090 at src/databricks/sql/parameters/native.py:715 - #4418440099 at src/databricks/sql/parameters/native.py:702 - #4418440106 at src/databricks/sql/parameters/native.py:704 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Medium · 1 Low Looks good overall: the fix to the DECIMAL(precision, scale) order, the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Addresses: - #4418478127 at src/databricks/sql/parameters/native.py:734 - #4418478139 at src/databricks/sql/parameters/native.py:678 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Medium · 2 Low The core fix is correct: the cast is now
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Addresses: - #4418514374 at src/databricks/sql/parameters/native.py:648 - #4418514381 at src/databricks/sql/parameters/native.py:737 - #4418514389 at CHANGELOG.md:4 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Medium · 1 Low Mostly good: the precision/scale order is fixed and the tests are thorough. One medium issue: callers using the old convention, which already worked, now silently stop rounding because widening runs after the legacy swap. One low issue: error messages after the swap can name the wrong argument.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Addresses: - #4418552981 at src/databricks/sql/parameters/native.py:674 - #4418552988 at src/databricks/sql/parameters/native.py:677 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Medium · 1 Low The fix is mostly sound and well tested:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Addresses: - #4418588494 at src/databricks/sql/parameters/native.py:660 - #4418588499 at src/databricks/sql/parameters/native.py:705 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 2 Low Looks good overall, with 2 low concerns. The
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Addresses: - #4418612993 at src/databricks/sql/parameters/native.py:773 - #4418612995 at src/databricks/sql/parameters/native.py:663 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Low Looks good, with one low concern. The precision/scale order fix, the legacy-swap handling with a
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Addresses: - #4418637929 at src/databricks/sql/parameters/native.py:740 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Low Looks good, with one low-severity edge case. The fix correctly binds
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low — The The CHANGELOG says a negative
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a test for the precision=0 invalid-scale case. Pushed 1bda507.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for picking this up. I can't see the fix at head, though. The
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The fix is already in the current branch head; I made no edits and the working tree is clean. In
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsAddresses: - #4418689780 at src/databricks/sql/parameters/native.py:652 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Low This looks good, with one low concern. The precision/scale ordering fix, the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Addresses: - #4418708511 at src/databricks/sql/parameters/native.py:724 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ No issues identified by the review bot.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThis branch was previously deployed1 inactive deployment
azure-prod
—
97b8acaa
Deployed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
engineer-bot
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 0 participantsAdd 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. | ||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |