Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/@local/hashql/eval/src/postgres/continuation.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Naming conventions and helpers for the continuation LATERAL subqueries.
//!
//! Each postgres island in a filter body produces a `CROSS JOIN LATERAL` subquery
//! that evaluates its CASE tree once per row (via `OFFSET 0`) and returns a
//! that evaluates its CASE tree once per row and returns a
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double space in doc comment after editing

Low Severity

After removing "(via OFFSET 0)" from the doc comment, a double space remains between "once per row" and "and returns a" on line 4. Minor formatting artifact from the edit.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit caff769. Configure here.

//! composite `continuation` value. This module provides the identifiers, column
//! names, and expression helpers used to construct and reference those subqueries.

Expand Down Expand Up @@ -80,7 +80,7 @@ impl From<ContinuationField> for ContinuationColumn {
pub(crate) enum ContinuationColumn {
/// The composite `continuation` value column in the LATERAL subquery.
///
/// The LATERAL is `(SELECT <CASE tree>::continuation AS c OFFSET 0) AS f0`,
/// The LATERAL is `(SELECT <CASE tree>::continuation AS c) AS f0`,
/// so field access is `(f0."c")."filter"`.
Entry,
/// The filter boolean. `NULL` means passthrough, `true` keeps, `false` rejects.
Expand Down
4 changes: 0 additions & 4 deletions libs/@local/hashql/eval/src/postgres/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
//! - **`block`** (`int`): next basic block when leaving the island.
//! - **`locals`** (`int[]`) and **`values`** (`jsonb[]`): parallel arrays carrying live-out locals.
//!
//! Continuation subqueries are forced to materialise once per row using `OFFSET 0` to prevent
//! PostgreSQL from inlining the subquery and duplicating the island's `CASE` tree per field access.
//!
//! ## Parameters and projections
//!
//! Parameters are deduplicated by identity and referenced by index (rendered as `$N` in SQL).
Expand Down Expand Up @@ -387,7 +384,6 @@ impl<'eval, 'ctx, 'heap, A: Allocator, S: BumpAllocator>
expression,
alias: Some(ContinuationColumn::Entry.identifier()),
}])
.offset(0)
Comment thread
cursor[bot] marked this conversation as resolved.
.build();
Comment thread
indietyp marked this conversation as resolved.

let subquery = query::FromItem::Subquery {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading