-
Notifications
You must be signed in to change notification settings - Fork 97
[SQL] Three bug fixes (3 commits) #5497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Mihai Budiu <[email protected]>
Signed-off-by: Mihai Budiu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes three bugs related to SQL compilation and adds documentation for window aggregate functions. The changes include fixing issues #5491 and #5493, along with improvements to variable naming and code organization in the compiler internals.
Changes:
- Fixed bug related to safe cast operations in SQL compilation
- Fixed bug related to lateness types handling in incremental compilation
- Improved variable naming and index tracking in join operations for better code clarity
- Added documentation for
FIRST_VALUEandLAST_VALUEwindow aggregate functions
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Regression2Tests.java | Added test case for issue #5493 validating SAFE_CAST with MAP types |
| IncrementalRegressionTests.java | Re-enabled test for issue #5491 (previously ignored) by removing @ignore annotation |
| InsertLimiters.java | Improved variable naming and fixed index tracking bug in join filter processing |
| ExpandSafeCasts.java | Fixed bug by moving nullable handling outside conditional block and removed unused import |
| ReferenceMap.java | Enhanced error message to include declaration IDs for better debugging |
| CalciteToDBSPCompiler.java | Fixed variable scope issue by creating new variable per iteration in projection loop |
| aggregates.md | Added documentation for FIRST_VALUE and LAST_VALUE window aggregate functions |
.../src/main/java/org/dbsp/sqlCompiler/compiler/visitors/outer/monotonicity/InsertLimiters.java
Outdated
Show resolved
Hide resolved
| <tr> | ||
| <td><a id="last_value"></a><code>LAST_VALUE(expression)</code></td> | ||
| <td>Returns the value of <code>expression</code> at the last row of the window frame. | ||
| Currently only supported for windows with <code>UNLIMITED RANGE</code></td> |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing period at the end of the sentence for consistency with other function descriptions.
| Currently only supported for windows with <code>UNLIMITED RANGE</code></td> | |
| Currently only supported for windows with <code>UNLIMITED RANGE</code>.</td> |
Signed-off-by: Mihai Budiu <[email protected]>
Fixes #5491
Fixes #5493
I also documented our (partial) support for
FIRST_VALUEandLAST_VALUEwindow aggregates.