Skip to content

Add array/conditional helpers#9

Open
avishniakov-smwb wants to merge 1 commit into
masterfrom
feature/ants/segments-mmx6-helpers
Open

Add array/conditional helpers#9
avishniakov-smwb wants to merge 1 commit into
masterfrom
feature/ants/segments-mmx6-helpers

Conversation

@avishniakov-smwb

Copy link
Copy Markdown
Collaborator

Adds the Firebolt helpers required in native LinqToDB:

  • ArrayTransform: two- and three-array overloads (ARRAY_TRANSFORM over parallel arrays, e.g. TRANSFORM(x, y -> (y - x), a, b))
  • ArrayMethods.At: 1-based array subscript (arr[index])
  • ArrayMethods.AsSqlArray: single-element array literal ([value])
  • ConditionalMethods.NullIf: NULLIF(value, compare) for divisor guards

Fixes in LambdaBuilder:

  • emit IS NULL / IS NOT NULL for == null / != null (was = NULL / != NULL)
  • support arithmetic (+ - * /) and boolean (AND/OR) operators in lambdas

Adds offline SQL-generation tests plus Northwind integration tests.

Adds the Firebolt helpers required to express the segments
TrafficAndEngagement (Mmx6) query in native LinqToDB:

- ArrayTransform: two- and three-array overloads (ARRAY_TRANSFORM over
  parallel arrays, e.g. TRANSFORM(x, y -> (y - x), a, b))
- ArrayMethods.At: 1-based array subscript (arr[index])
- ArrayMethods.AsSqlArray: single-element array literal ([value])
- ConditionalMethods.NullIf: NULLIF(value, compare) for divisor guards

Fixes in LambdaBuilder:
- emit IS NULL / IS NOT NULL for == null / != null (was = NULL / != NULL)
- support arithmetic (+ - * /) and boolean (AND/OR) operators in lambdas

Adds offline SQL-generation tests plus Northwind integration tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant