[AURON #2590] Preserve session timezone in timestamp truncation #2607
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 · 205 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.319
Real PR Conversation Timeline
1 comments
"Review active on #2607"
general
weight: 0.35
cxzl25
Which issue does this PR close?
Closes #2590
Rationale for this change
TruncTimestampcurrently maps to DataFusiondate_trunc, but Auron's native timestamp type does not carry Spark's session timezone. In Asia/Shanghai, midnight on Monday is still Sunday in UTC, so truncating to a week can return the previous Monday.What changes are included in this PR?
Evaluate
TruncTimestampthrough the existing Spark expression wrapper inside the native projection. This preserves the resolved session timezone and Spark's format aliases and invalid-format behavior, at the cost of using the Spark wrapper for timestamp truncation.Add converter serialization regressions and extend the native query test across UTC, Asia/Shanghai and America/Los_Angeles, including the reported dates, aliases and null/invalid formats.
Are there any user-facing changes?
Timestamp truncation respects the Spark session timezone, including week boundaries outside UTC.
How was this patch tested?
preprofile.mvn -Pspark-3.5 -Pscala-2.12 -DskipBuildNative -DskipTests=false -pl spark-extension-shims-spark -am test— BUILD SUCCESS; 264 tests passed, 23 suites completed, no failures or aborted suites. The native library was built separately before this command.git diff --checkpassed.Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex CLI 0.163.0