#761 Fix handling of special characters in column names by adding backtick escaping in schema corrections.#764
Conversation
…ktick escaping in schema corrections.
|
Warning Review limit reached
More reviews will be available in 40 minutes and 1 second. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughIn ChangesBacktick quoting for decimal schema field names
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@pramen/core/src/main/scala/za/co/absa/pramen/core/utils/JdbcSparkUtils.scala`:
- Around line 280-291: Update JdbcSparkUtilsSuite to match the new quoted-schema
behavior from JdbcSparkUtils; the current assertions still expect unquoted field
fragments, so revise the tests to assert backtick-quoted column names and
aligned type strings wherever the suite checks the schema output. Also add a
regression test covering a name like PaidAmount (Incl VAT) to verify the quoted
contract is preserved end-to-end when generating the corrected schema.
- Around line 280-291: Escape any backticks inside field.name before building
the customSchema strings in JdbcSparkUtils.correctSchema so quoted identifiers
remain valid Spark SQL; update the schema-building cases that append `newSchema`
for the DecimalType/other field branches to use doubled backticks within the
surrounding backticks, and adjust JdbcSparkUtilsSuite expectations to assert the
escaped quoted output.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 252a5c23-eee3-4902-8ec6-857b9ae37715
📒 Files selected for processing (1)
pramen/core/src/main/scala/za/co/absa/pramen/core/utils/JdbcSparkUtils.scala
…ktick escaping in schema corrections.
Unit Test Coverage
Files
|
Closes #761
Test Evidence
The change confirmed fixed the ingestion from the original dataset that contain parenthesis in decimal field names.
Summary by CodeRabbit