feat(spark): implement Spark-compatible lower and lcase #398
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.36) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 198 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.317
Real PR Conversation Timeline
1 comments
"Review active on #398"
general
weight: 0.35
andygrove
Which issue does this PR close?
Closes #207.
Rationale for this change
Spark features currently use DataFusion's
lower, which rejects binary input, and do not registerlcase. Spark accepts both names and decodes malformed binary input with replacement before lowercasing.What changes are included in this PR?
lowerand itslcasealias with shared Spark input coercion.This targets UTF8_BINARY with Spark 4.2's default case mappings. Locale-specific collations and the JVM fallback are outside this PR. Remaining implicit CAST formatting differences are tracked by #88.
Are these changes tested?
lower.sltandlcase.sltcover scalar/column input, all string layouts, dictionaries, ASCII and Unicode, contextual sigma, dotted-I expansion, supplementary characters, NULLs, binary decoding and both ANSI modes. A unit test checks return layout and nullability. The Spark 4.2.0 runner passes all 103 comparable records; ten runner-specific records are skipped, with no expected failures.Formatting, workspace Clippy, 596 library tests, five documentation tests, all 516 SQL test runs and documentation generation pass.
Are there any user-facing changes?
Spark mode now provides
lcaseand accepts binary input for both names, including malformed UTF-8. Existing Unicode lowercase behavior is pinned by Spark-verified tests.