fix(sql): fix ASOF JOIN crash when ON clause has symbol and other columns#6634
Conversation
…umns ASOF JOIN queries with a symbol column AND another column in the ON clause would throw UnsupportedOperationException when using the Light join factory. The single-symbol optimization was incorrectly applied when there were multiple join keys, creating a map that only supported INT keys while the record copier attempted to write all column types.
WalkthroughA modification to the ASOF join optimization in SqlCodeGenerator tightens the fallback condition for single-symbol short-circuit optimization by requiring exactly one join key column on the master side. A corresponding test method is added to verify ASOF join behavior with symbol and timestamp columns. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
|
@coderabbitai pls review |
🧩 Analysis chain@jerrinot, I'll review the changes in this PR. 🏁 Script executed: Length of output: 4106 @jerrinot, I'll conduct a comprehensive review of this PR. ✅ Actions performedReview triggered.
|
[PR Coverage check]😍 pass : 3 / 3 (100.00%) file detail
|
ASOF JOIN queries with a symbol column AND another column in the ON clause would throw
UnsupportedOperationExceptionwhen using the Light join factory.The single-symbol optimization was incorrectly applied when there were multiple join keys, creating a map that only supported INT keys while the record copier attempted to write all column types.
In some cases it does not crash, but it can silently return wrong results.