Skip to content

feat(drivers): sql_preamble data source option - #11464

Open
igorlukanin wants to merge 8 commits into
masterfrom
igor/core-670-support-for-looker-sql_preamble-with-bigquery
Open

feat(drivers): sql_preamble data source option#11464
igorlukanin wants to merge 8 commits into
masterfrom
igor/core-670-support-for-looker-sql_preamble-with-bigquery

Conversation

@igorlukanin

Copy link
Copy Markdown
Member

Summary

Adds a sql_preamble data source option: SQL that runs in the context of every query Cube sends to a data source. Its main use is defining temporary UDFs the data model's SQL then calls, which on a stateless data source like BigQuery is the only way to get a user-defined function in scope. Configurable as CUBEJS_DB_SQL_PREAMBLE (with the usual per-data-source and pre-aggregation variants) or as the sqlPreamble driver option.

One semantic, per-driver mechanisms. What holds everywhere is that the primary query executes in the preamble's context; how that is achieved differs because the execution models do:

  • BigQuery — prepended into the query text, since the data source is stateless and a temp UDF only exists within a single query. Both the query and the streaming path.
  • Snowflake — once on the long-lived session, after the driver's ALTER SESSION so a user can override those defaults deliberately.
  • Postgres, Crate, Materialize — per acquired connection, through a shared applySqlPreamble hook so the two drivers that replace prepareConnection still apply it.
  • MySQL — per connection on all three paths that run user SQL, including downloadQueryResults.
  • DuckDB — on the connection init() prepares, plus a replay on the separate connection stream() opens.
  • JDBC — appended to the per-dbType built-ins, built-ins first, on the query and streaming paths.

Every driver's stream() is a separate hook from its query path, so each is wired and covered individually.

Pre-aggregations. A pre-aggregation-specific preamble follows the existing pre-aggregation credentials convention, but with one deliberate difference: it inherits the regular preamble when unset. A preamble usually defines a function the model depends on, and a build that silently ran without it would fail later on the missing function; credentials do not inherit because a half-inherited connection target is worse than none. Setting it to an empty value opts builds out entirely.

The preamble also participates in the pre-aggregation structure and content versions, so changing it rebuilds the pre-aggregations on that data source. That is the point — a preamble can change what identical SQL returns, so serving a table built under a different one would be wrong. A deployment that sets no preamble computes a byte-identical version key, so upgrading rebuilds nothing.

Two subtleties worth calling out, both of which were bugs before they were fixed here:

  • The preamble is excluded from the check that switches credentials into the pre-aggregation namespace, because it is session setup rather than a connection target. That exclusion also has to be reflected where drivers are cached per data source — otherwise a build shares the query driver and runs the query-path preamble while the version key records the pre-aggregation one.
  • The version is resolved from the environment, not from a driver, because two of the four call sites that compute a structure version are statics with no driver in scope, and both version functions are synchronous. A preamble set only through driver_factory therefore does not participate in the key; that is documented.

No breaking changes. initSql (DuckDB) and prepareConnectionQueries (JDBC) keep working as deprecated aliases with their existing behavior — initSql still swallows failures wherever it runs, prepareConnectionQueries still replaces the built-ins rather than appending, and both warn once per driver instance. sql_preamble itself fails loudly, so a preamble meant to define a function does not resurface as a baffling "function does not exist".

Also fixed, because the feature surfaced them:

  • Postgres and MySQL pools reuse connections, so a preamble that creates anything failed on the second query. A statement already applied is now skipped; syntax and permission errors still surface.
  • Prepending onto a BigQuery pre-aggregation build makes the request a script, and a script job ignores the destination table — the build would have reported success having written nothing. Anything outside the CREATE TEMP FUNCTION-then-query shape BigQuery exempts is now refused with an actionable message.
  • The statement splitter mis-split on backslashes (wrong under standard_conforming_strings), # comments, nested block comments, and bare $$. It is now conservative: input it cannot parse confidently is passed to the engine whole rather than split on a guess.

JDBCDriver's connection queries never running on the query path is fixed separately in #11456; this branch will rebase onto it.

Test plan

  • 648 unit tests green across 11 packages, ~150 new
  • Every new guard red-checked by mutation — including re-introducing each fixed defect and confirming the tests catch it
  • Preamble delivery asserted as executed statements per driver, on both the query and streaming paths, rather than as a resolver's return value
  • Env resolution covered end-to-end through a real driver constructor, not just the resolver
  • Real preamble execution against in-memory DuckDB, including the connection-scoped case that only passes if the stream replay works
  • Upgrade safety verified empirically: the structure and content versions are unchanged for a deployment with no preamble, whitespace-only preamble, or a reformatted one
  • unit scripts added where credential-free tests existed but never ran in CI
  • CI must pass

@igorlukanin
igorlukanin requested review from a team as code owners August 3, 2026 20:24
@github-actions github-actions Bot added driver:mysql Issues relating to the MySQL/MariaDB driver driver:bigquery Issues related to the BigQuery driver driver:snowflake Issues relating to the Snowflake driver driver:postgres Issues relating to the Postgres driver driver:crate javascript Pull requests that update Javascript code data source driver driver:duckdb driver:materialize labels Aug 3, 2026
@claude

claude Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @igorlukanin's task in 7m 3s —— View job


Review complete — solid feature, 2 medium correctness gaps + missing docs (2 medium, 1 medium-doc, 4 low)

Full review
  • Gather context (read branch files; origin/master was shallow, so the review is against the six PR commits)
  • Review core: sql-preamble.ts, BaseDriver, env resolution
  • Review per-driver wiring (BigQuery, Snowflake, PG/Crate/Materialize, MySQL, DuckDB, JDBC)
  • Review pre-aggregation version/driver-cache changes
  • Review tests & docs
  • Post review (6 inline comments)

General

This is unusually careful work. The rationale-in-code is genuinely useful rather than decorative (why the pre-agg preamble inherits while credentials don't, why the version is resolved from the env rather than a driver, why initSql keeps swallowing failures), the deprecation posture is explicit, and the upgrade-safety tests — byte-identical version key for no preamble, whitespace-only, and reformatted values — are exactly the tests that prevent a nasty surprise on rollout. Wiring each driver's stream() as a separate hook, and asserting the executed statements rather than a resolver's return value, is the right level of paranoia for something that mutates session state.

Findings

# Sev Where Issue
1 Medium BigQueryDriver.ts:505 isScriptSafePreamble trusts the splitter's ambiguous fallback. On unparseable input splitSqlPreamble returns the whole blob as one statement; if it starts with CREATE TEMP FUNCTION the guard passes even though more statements follow → script job → destination ignored → build reports success writing nothing. That is precisely the failure the guard was added for. Repro in the inline comment (nested block comment, which this splitter nests and BigQuery doesn't).
2 Medium JDBCDriver.ts:333, :358 JDBC is the only pooled driver that runs preamble statements without the already-applied tolerance the PR added for Postgres/MySQL. A CREATE … preamble — the headline use case — fails on the second query that reuses a connection. Route the preamble portion through applySqlPreambleStatements, keeping the built-ins raw.
3 Medium docs No /docs-mintlify changes at all, though the PR body says "and docs" and "that is documented". CUBEJS_DB_SQL_PREAMBLE (plus per-data-source and PRE_AGGREGATIONS_ variants), the sqlPreamble driver option, the driver_factory-doesn't-participate-in-the-version-key caveat, the BigQuery destination restriction, and which drivers support it all need a home in the env-var reference.
4 Low sql-preamble.ts:139 A trailing comment becomes its own statement ('SET a = 1;\n-- note'['SET a = 1', '-- note']). Snowflake rejects an empty statement, JDBC is driver-dependent, and on BigQuery it makes a legitimate UDF-plus-comment preamble get refused on builds with a message telling the user to do what they did.
5 Low sql-preamble.ts:72, :127 Escaping rules are applied as universal but are dialect-specific: no-backslash-escape is right for PG/DuckDB/Snowflake and wrong for MySQL and BigQuery (mis-splits 'it\'s; fine'); # as a line comment is wrong for Postgres, where # is an operator. Both drivers involved split statements individually.
6 Low PreAggregations.ts:104 Version participation is unconditional while only 8 drivers implement the preamble — on ClickHouse/MSSQL/Athena/Firebolt/Druid/Elasticsearch, setting the env var rebuilds every pre-aggregation and changes nothing, silently. Also the catch swallows every error, not just the assertDataSource case it documents.
7 Low DuckDBDriver.ts:284, server.ts:625 Two consistency nits: DuckDB re-implements isAlreadyAppliedPreambleError with a narrower regex; server.ts compares raw env values while everything downstream compares normalized ones, so a stray newline spawns a redundant driver and pool.

Also, minor and not worth an inline: BigQueryDriver spreads ...config into this.options passed to new BigQuery(...), so sqlPreamble / preAggregationsSqlPreamble leak into the client options — Postgres and MySQL strip them, BigQuery doesn't.

Security / performance

No injection surface added that didn't already exist — the preamble is operator-supplied config, not tenant input, and nothing interpolates request data into it. Worth noting for the record that it is not safe to expose via driver_factory on per-tenant context without the operator understanding it runs as session setup. Performance: splitSqlPreamble slices the remaining string once per character for the dollar-tag regex (O(n²)), irrelevant at preamble sizes; JDBC re-resolves the preamble from the env on every query and stream, cheap but memoizable.

Testing

Coverage is strong — env resolution end-to-end through real constructors, delivery asserted per driver on both paths, real DuckDB execution including the stream-replay case. Gaps map to the findings above: no test for the ambiguous-split path reaching the BigQuery destination guard (#1), none for a reused JDBC connection (#2), none for a trailing comment-only segment (#4), and none for backslash-escaped quotes under a MySQL-style dialect (#5). The new unit scripts do get picked up by lerna run unit in CI, so those tests will actually run.

· branch `igor/core-670-support-for-looker-sql_preamble-with-bigquery`

Comment on lines +505 to +512
protected static isScriptSafePreamble(preamble: string): boolean {
const statements = splitSqlPreamble(preamble);

return statements.length > 0 && statements.every(
statement => /^create\s+(or\s+replace\s+)?temp(orary)?\s+function\b/i
.test(BigQueryDriver.withoutLeadingComments(statement))
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The destination guard inherits the splitter's ambiguous fallback, so the exact failure it exists to prevent can still slip through.

splitSqlPreamble returns [normalized] — the whole blob as one statement — whenever it meets something it cannot parse confidently (nested block comment, bare $$, unterminated construct). isScriptSafePreamble then sees statements.length === 1 and only checks that this single "statement" starts with CREATE TEMP FUNCTION, so a blob that in fact contains further statements is judged script-safe.

Concretely, with

CREATE TEMP FUNCTION f(x INT64) AS (x); /* uses /* nested */ SET @@dataset_id = 'analytics'

the splitter goes ambiguous (it nests block comments, BigQuery does not) → one statement → passes the regex → prepended onto a destination job. BigQuery parses three statements, runs the request as a script, ignores destinationTable, and the pre-aggregation build reports success having written nothing — the silent-empty-table case the guard was added for.

Ambiguity should be fail-closed here: have splitSqlPreamble signal that it gave up (a second return value / a sibling trySplitSqlPreamble) and treat that as not script-safe, or at minimum reject when the single returned statement still contains a ; that is not its terminator.

Fix this →

@claude

claude Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Reviewing feat(drivers): sql_preamble data source option

  • Gather context (base ref, diff)
  • Review core: sql-preamble.ts, BaseDriver, env resolution
  • Review per-driver wiring (BigQuery, Snowflake, PG/Crate/Materialize, MySQL, DuckDB, JDBC)
  • Review pre-aggregation version / driver-cache changes
  • Review tests & docs
  • Dedupe against prior threads, post review

View job run

Comment on lines +356 to +360
// A streamed query has to run in the preamble's context too; this path
// used to skip the connection queries the query path replays.
for (const statementSql of this.prepareConnectionQueries()) {
await this.executeStatement(conn, statementSql);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

JDBC is the one pooled driver that doesn't get the already-applied tolerance.

The PR fixes exactly this for Postgres and MySQL via applySqlPreambleStatements (pool reuses connections → a CREATE … preamble fails on the second query). JDBC pools connections the same way (this.pool.acquire() here and in queryPromised), but both paths execute the statements raw through executeStatement, so an "already exists" on a reused connection propagates as a query failure.

This was safe before the feature because the built-in prepareConnectionQueries are only SETs; it stops being safe now that user SQL — whose headline use case is creating a function — flows through the same list. Suggest running the preamble portion through applySqlPreambleStatements while keeping the built-ins raw:

for (const statementSql of builtInQueries) {
  await this.executeStatement(conn, statementSql);
}
await applySqlPreambleStatements(preamble, statement => this.executeStatement(conn, statement));

Fix this →

Comment on lines +139 to +146
} else if (char === ';') {
const statement = normalizeSqlPreamble(current);
if (statement) {
statements.push(statement);
}
current = '';
index += 1;
end = -2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A trailing comment becomes its own statement.

Comments are appended into current, so 'SET a = 1;\n-- note' splits into ['SET a = 1', '-- note'] — the second entry has no executable token. Every driver that executes statements one at a time then sends a comment-only statement to the engine: Snowflake rejects an empty statement outright, JDBC's executeQuery on a comment-only string is driver-dependent, and on BigQuery withoutLeadingComments reduces it to '' so isScriptSafePreamble refuses a perfectly legitimate

CREATE TEMP FUNCTION median(x FLOAT64) AS (x);
-- keep in sync with the data model

on pre-aggregation builds, with a message telling the user to do what they already did.

Dropping segments that contain no non-comment token (or tracking whether anything but whitespace/comments was consumed since the last ;) fixes all three at once, and the 'SET a = 1;\n-- note' / trailing-comment case is worth a unit test either way.

Fix this →

Comment on lines +104 to +126
export function getPreAggregationSqlPreamble(preAggregation): string | undefined {
let fromEnv: string | undefined;

try {
fromEnv = getEnv('dbSqlPreamble', {
dataSource: preAggregation.dataSource || 'default',
preAggregations: true,
});
} catch (e) {
// `assertDataSource` throws for a data source missing from
// CUBEJS_DATASOURCES. This runs inside version computation and inside the
// builder for the "no partitions were built" message, so throwing here would
// replace an actionable error with a confusing one. A key without the
// preamble is the pre-feature behavior, which is the safe fallback.
return undefined;
}

// Normalized the same way the drivers normalize it, so the version reflects
// the preamble that actually runs: without this, re-indenting a preamble — or
// setting a whitespace-only one, which the drivers treat as none at all —
// would change the key and rebuild every pre-aggregation for no behavior
// difference.
return normalizeSqlPreamble(fromEnv);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The version key participates for every driver, but only eight drivers implement the preamble.

This reads the env unconditionally, so on a deployment whose data source is ClickHouse, MS SQL, Athena, Firebolt, Druid, Elasticsearch, … setting CUBEJS_DB_SQL_PREAMBLE re-keys and rebuilds every pre-aggregation while changing nothing about how queries run — the driver silently ignores the option. That's the worst combination: cost with no effect and no signal.

Two mitigations worth considering, ideally both:

  • Warn once at driver construction (or in BaseDriver) when a preamble is configured for a driver that doesn't implement it, so the no-op is visible.
  • Or gate version participation on driver support rather than on the env var merely being present.

Separately, the catch swallows any failure, not just assertDataSource. If getEnv ever throws for another reason the key silently loses the preamble and stale tables get served — narrowing the catch (or logging it) would keep the fallback intentional.

Comment on lines +72 to +93
// Finds the end of a quoted string or identifier, or -1 when it never closes.
//
// A doubled quote is an escaped quote in every dialect here. A backslash is
// NOT treated as an escape: Postgres, DuckDB and Snowflake follow the standard
// (`standard_conforming_strings`), where a trailing backslash is a literal
// character, so consuming the following quote would swallow the terminator and
// merge two statements.
const endOfQuoted = (start: number, quote: string): number => {
let cursor = start + 1;

while (cursor < normalized.length) {
if (normalized[cursor] !== quote) {
cursor += 1;
} else if (normalized[cursor + 1] === quote) {
cursor += 2;
} else {
return cursor + 1;
}
}

return -1;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The no-backslash-escape rule is right for Postgres/DuckDB/Snowflake and wrong for MySQL and BigQuery — and those two are also drivers that execute the split statements individually.

MySQL escapes with backslashes by default (NO_BACKSLASH_ESCAPES off), and BigQuery always does. So SET a = 'it\'s; fine'; SET b = 2 in a MySQL preamble terminates the literal at the escaped quote here, splits on the ; inside it, and hands MySQL two syntactically broken statements. The comment explains the choice as universal, but it's dialect-dependent — either take an optional dialect hint from the caller (each driver knows its own), or treat a backslash-immediately-before-quote as ambiguous and fall back to the unsplit blob, which is the conservative posture the rest of this function already takes.

Also dialect-specific: # is unconditionally a line comment (line 127), but in Postgres # is a valid operator (bitwise XOR, geometric ops), so SET a = 5 # 3; SET b = 1 swallows the separator and merges the two statements. Lower practical risk, same root cause.

@igorlukanin
igorlukanin requested a review from keydunov as a code owner August 3, 2026 20:31
Comment on lines +276 to +287
for (const statement of splitSqlPreamble(preamble ?? legacy)) {
try {
await execAsync(statement);
} catch (e) {
if (legacy) {
if (this.logger) {
console.error('DuckDB - error on init sql (skipping)', { e });
}
} else if (!/already exists/i.test((e as Error)?.message ?? '')) {
throw e;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This re-implements isAlreadyAppliedPreambleError with a narrower regex (/already exists/i only). The shared helper also covers duplicate function / is already defined, and any future spelling added there won't reach here. Since the loop is otherwise identical to applySqlPreambleStatements, the legacy branch aside, importing the predicate keeps the two definitions of "already applied" from drifting.

Suggested change
for (const statement of splitSqlPreamble(preamble ?? legacy)) {
try {
await execAsync(statement);
} catch (e) {
if (legacy) {
if (this.logger) {
console.error('DuckDB - error on init sql (skipping)', { e });
}
} else if (!/already exists/i.test((e as Error)?.message ?? '')) {
throw e;
}
}
for (const statement of splitSqlPreamble(preamble ?? legacy)) {
try {
await execAsync(statement);
} catch (e) {
if (legacy) {
if (this.logger) {
console.error('DuckDB - error on init sql (skipping)', { e });
}
} else if (!isAlreadyAppliedPreambleError(e)) {
throw e;
}

Comment thread packages/cubejs-server-core/src/core/server.ts
@claude

claude Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Claude finished @igorlukanin's task in 3m 16s —— View job


Re-review after 3 new commits — docs gap closed, 5 prior findings still stand, 1 new (doc, low)

Full review
  • Gather context (3 commits since last review: 3f95957, 1ecdc93, d232f7e, ccad0d2)
  • List existing review threads, resolve stale ones (1 resolved)
  • Re-check each prior finding against current code
  • Review the new commits (server.ts preamble sharing, docs)
  • Post review

What changed since the last pass

Commit Effect on prior review
d232f7e normalize both sides of the sharing comparison Fixes the server.ts:630 finding — both sides now go through normalizeSqlPreamble, and the catch carries the explanation it was missing. Thread resolved.
ccad0d2 docs Closes the "no /docs-mintlify changes" finding, and closes it well. CUBEJS_DB_SQL_PREAMBLE has a real reference section covering the data-source decoration, the pre-aggregation inheritance and its empty-value opt-out, the cache-key participation, the driver_factory-doesn't-participate caveat and the set-it-identically-everywhere requirement; BigQuery gets the script/destination restriction with the upstream links; DuckDB and Databricks get the initSql / prepareConnectionQueries deprecation posture; refreshing-pre-aggregations.mdx documents the one variable that inherits, and using-pre-aggregations.mdx warns about the rebuild. All three new link references (ref-config-driver-factory, ref-config-multiple-ds-decorating-env, ref-preagg-data-source) resolve to definitions that exist.
1ecdc93, 3f95957 Already covered by the previous pass.

Still applies (re-affirmed, not reposted)

Verified against the current tree; all five are unchanged in the code:

Sev Where Issue
Medium BigQueryDriver.ts:505 isScriptSafePreamble still trusts splitSqlPreamble's ambiguous [normalized] fallback → a multi-statement blob starting with CREATE TEMP FUNCTION passes and a destination job silently writes nothing.
Medium JDBCDriver.ts:333, :358 Both pooled paths still call executeStatement raw; no applySqlPreambleStatements, so a CREATE … preamble fails on the second query that reuses a connection.
Low sql-preamble.ts:140 Trailing comment still becomes its own statement ('SET a = 1;\n-- note' → 2 entries, second executable-free).
Low sql-preamble.ts:79, :127 Backslash-not-an-escape and #-as-comment are still applied universally though both are dialect-specific (wrong for MySQL/BigQuery and Postgres respectively).
Low PreAggregations.ts:104 Version participation still unconditional across all drivers; catch still swallows every error.

The DuckDB nit (DuckDBDriver.ts:284 re-implementing isAlreadyAppliedPreambleError as a narrower /already exists/i) is also unchanged — still just a drift risk, not a bug.

New this pass

1 · Low · environment-variables.mdx:1042 — the new reference section explains when the preamble runs but never which drivers implement it, and the sentence that lists mechanisms omits Crate, Materialize and DuckDB. Combined with the unconditional cache-key participation, a ClickHouse/Athena/Druid user following this page pays a full pre-aggregation rebuild for a silent no-op. Posted inline.

Minor, no inline: the new ### SQL preamble section lands under ## Setup in google-bigquery.mdx (line 93, right after ### Cube Cloud, so it reads as part of Cube Cloud setup) but under ## Environment Variables in duckdb.mdx and databricks-jdbc.mdx. Worth making consistent.

Testing

The new server.ts driver-sharing branch (hasSeparatePreAggSqlPreamble) has no test — packages/cubejs-server-core/test/unit/ contains nothing touching dbSqlPreamble. The PR body calls this out as one of the two subtleties "which were bugs before they were fixed here", and it decides whether a build runs the preamble the version key recorded, so it's the change in this PR most worth a regression test. The rest of the coverage remains strong; the other gaps are the ones listed in the standing findings (ambiguous-split reaching the BigQuery guard, reused JDBC connection, comment-only segment, backslash-escaped quote).

Security / performance

Nothing new. The preamble remains operator-supplied config with no request data interpolated; normalizeSqlPreamble on both sides of the sharing comparison actually reduces pool duplication.

· branch `igor/core-670-support-for-looker-sql_preamble-with-bigquery`


</Warning>

When the preamble runs depends on how the data source handles connections. On

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This paragraph describes when the preamble runs but never says which drivers implement it — and that omission has a cost, because the pre-aggregation cache key participates unconditionally.

Eight drivers wire it up (BigQuery, Snowflake, Postgres, Crate, Materialize, MySQL, DuckDB, JDBC-based). On any other data source — ClickHouse, MS SQL, Athena, Firebolt, Druid, Elasticsearch, … — setting this variable silently does nothing to how queries run, while getPreAggregationSqlPreamble still folds it into the structure and content versions and rebuilds every pre-aggregation. A user following this page on ClickHouse pays a full rebuild for a no-op, with the reference page implying it should work.

Worth an explicit supported-drivers list here (the "On Snowflake … On Postgres, MySQL and the JDBC-based drivers … on BigQuery" sentence already omits Crate, Materialize and DuckDB), plus a <Warning> that the variable is ignored elsewhere. Pairs with the unresolved thread on PreAggregations.ts suggesting a construction-time warning or gating version participation on driver support.

Fix this →

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.08511% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.34%. Comparing base (5a47e08) to head (ccad0d2).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
packages/cubejs-duckdb-driver/src/DuckDBDriver.ts 79.16% 4 Missing and 1 partial ⚠️
...kages/cubejs-bigquery-driver/src/BigQueryDriver.ts 84.00% 4 Missing ⚠️
packages/cubejs-base-driver/src/BaseDriver.ts 50.00% 2 Missing ⚠️
packages/cubejs-base-driver/src/sql-preamble.ts 98.95% 0 Missing and 1 partial ⚠️
packages/cubejs-server-core/src/core/server.ts 90.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (5a47e08) and HEAD (ccad0d2). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5a47e08) HEAD (ccad0d2)
cubesql 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #11464       +/-   ##
===========================================
- Coverage   79.43%   59.34%   -20.09%     
===========================================
  Files         480      228      -252     
  Lines       98778    18226    -80552     
  Branches     3636     3715       +79     
===========================================
- Hits        78460    10817    -67643     
+ Misses      19800     6883    -12917     
- Partials      518      526        +8     
Flag Coverage Δ
cube-backend 59.34% <93.08%> (+0.34%) ⬆️
cubesql ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data source driver driver:bigquery Issues related to the BigQuery driver driver:crate driver:duckdb driver:materialize driver:mysql Issues relating to the MySQL/MariaDB driver driver:postgres Issues relating to the Postgres driver driver:snowflake Issues relating to the Snowflake driver javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant