You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #398: adds its 17 TypeCast cases as a kitchen-sink fixture so they get the generated compact/pretty AST round-trip tests.
__fixtures__/kitchen-sink/misc/typecast.sql (new fixture)
Regenerated __fixtures__/generated/generated.json, packages/deparser/__tests__/kitchen-sink/misc-typecast.test.ts, and the transform-ast kitchen-sink fixtures.json entries.
The hand-written output assertions in __tests__/misc/typecast.test.ts stay as-is. Test-only; no source or version changes.
This PR is a fixtures-only change: it adds a new misc/typecast.sql kitchen-sink fixture exercising TypeCast round-trips (CAST vs ::, negative constants, qualified/typmod/array type names), regenerates the deparser's generated.json and its misc-typecast.test.ts test file, and refreshes the transform-ast fixtures.json snapshot. No deparser or other production source was modified. Static review traced the new fixtures against the existing TypeCast deparse logic (bpchar branch, negative-constant guard, pg_catalog type handling) and found them consistent with the reparse-equality test contract.
No actionable comments were generated in the recent review.
Walkthrough
The pull request adds SQL fixtures for CAST and :: syntax edge cases. It registers 17 numbered fixtures in the manifest and adds a deparser test that runs them.
Changes: Typecast Fixture Coverage
Layer / File(s)
Summary
Add and register typecast fixtures __fixtures__/kitchen-sink/misc/typecast.sql, packages/transform-ast/__tests__/kitchen-sink/fixtures.json, packages/deparser/__tests__/kitchen-sink/misc-typecast.test.ts
Adds fixtures for typecast syntax and edge cases. Registers 17 fixture paths and adds a test that runs them.
Merge Risk: Minimal · up to 2d619 · assessed changes only
Path filters excluded changed files. This rating applies only to the assessed changes.
Security architecture risk: Minimal · up to 2d619
The change expands test coverage without changing how applications call, run, or deploy the deparser.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "test(deparser): add TypeCast kitchen-sink fixtures" matches the main change. The PR adds a typecast.sql kitchen-sink fixture with 17 TypeCast cases, a misc-typecast test file, and fixtures.…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "test(deparser): add TypeCast kitchen-sink fixtures" matches the main change. The PR adds a typecast.sql kitchen-sink fixture with 17 TypeCast cases, a misc-typecast test file, and fixtures.json manifest entries. The title names the change type, the scope, and the fixture purpose. It does not mention the generated.json regeneration, but that detail is not required.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.
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
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
Follow-up to #398: adds its 17 TypeCast cases as a kitchen-sink fixture so they get the generated compact/pretty AST round-trip tests.
__fixtures__/kitchen-sink/misc/typecast.sql(new fixture)__fixtures__/generated/generated.json,packages/deparser/__tests__/kitchen-sink/misc-typecast.test.ts, and the transform-ast kitchen-sinkfixtures.jsonentries.The hand-written output assertions in
__tests__/misc/typecast.test.tsstay as-is. Test-only; no source or version changes.Implemented in session Redo parse-tree-based TypeCast deparsing
Review with Devin · Open in Devin Desktop
Summary by CodeRabbit
CASTsyntax, including edge cases involving expressions, function calls, type names, and negative values.