Repository navigation
test(bigquery-jdbc): add Storage Write API all-types parity and SQL-fallback integration tests - #15109
Closed
Neenu1995 wants to merge 1 commit into
Closed
test(bigquery-jdbc): add Storage Write API all-types parity and SQL-fallback integration tests#15109Neenu1995 wants to merge 1 commit into
Neenu1995 wants to merge 1 commit into
Conversation
…allback integration tests Stack: PR 5 of 5 (base: `fix/swa-proto-4-direct-insert-gating`) ### Summary - Add end-to-end integration regression tests in `ITNightlyBigQueryTest` verifying cell-by-cell ResultSet parity (and asserting Storage Write API vs. standard SQL execution path via driver logs) between `EnableWriteAPI=1` (`ProtoSchema` Storage Write API) and `EnableWriteAPI=0` (standard SQL DML) across BigQuery data types (`STRING` including non-ASCII/hyphenated column `` `c-str-é` ``, `BYTES`, `INT64`, `FLOAT64`, `NUMERIC`, `NUMERIC(10, 2)`, `BIGNUMERIC`, `BOOL`, `DATE`, `TIME`, `DATETIME`, `TIMESTAMP`, `JSON`, and `NULL` `GEOGRAPHY`/`INTERVAL`), `NULL` rows, and reordered column lists. - Add end-to-end integration tests verifying automatic SQL DML fallback when `EnableWriteAPI=1` is used with SQL functions/expressions in `VALUES (...)` (`UPPER(?)`, `SHA256(?)`, and non-null `ST_GEOGFROMTEXT(?)`, `MAKE_INTERVAL(...)`, `PARSE_JSON(?)`) or complex `ARRAY`/`STRUCT`/`RANGE` target tables. ### Testing - `make lint`, `mvn -B -ntp verify -DskipTests -DskipITs`, `mvn -B -ntp dependency:analyze-only -DfailOnWarning=true`, `mvn -q -Denforcer.skip=true -Dclirr.skip=true test-compile`, and full `make unittest` (credentialed live execution of `ITNightlyBigQueryTest` requires `GOOGLE_APPLICATION_CREDENTIALS` in CI).
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds integration tests to ITNightlyBigQueryTest.java to verify the behavior of bulk inserts using the BigQuery Storage Write API. Specifically, it introduces testBulkInsertWriteApiAllTypesParityWithStandardSql to ensure data type parity between the Write API and standard SQL, and testBulkInsertWriteApiSqlExpressionAndComplexTypeFallback to validate fallback behavior to standard SQL when SQL expressions or complex types are present. Helper methods for populating test batches and asserting Write API usage via logs were also added. There are no review comments, and I have no additional feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack: PR 5 of 5
Summary
ITNightlyBigQueryTestverifying cell-by-cell ResultSet parity (and asserting Storage Write API vs. standard SQL execution path via driver logs) betweenEnableWriteAPI=1(ProtoSchemaStorage Write API) andEnableWriteAPI=0(standard SQL DML) across BigQuery data types (STRINGincluding non-ASCII/hyphenated column`c-str-é`,BYTES,INT64,FLOAT64,NUMERIC,NUMERIC(10, 2),BIGNUMERIC,BOOL,DATE,TIME,DATETIME,TIMESTAMP,JSON, andNULLGEOGRAPHY/INTERVAL),NULLrows, and reordered column lists.EnableWriteAPI=1is used with SQL functions/expressions inVALUES (...)(UPPER(?),SHA256(?), and non-nullST_GEOGFROMTEXT(?),MAKE_INTERVAL(...),PARSE_JSON(?)) or complexARRAY/STRUCT/RANGEtarget tables.Testing
make lint,mvn -B -ntp verify -DskipTests -DskipITs,mvn -B -ntp dependency:analyze-only -DfailOnWarning=true,mvn -q -Denforcer.skip=true -Dclirr.skip=true test-compile, and fullmake unittest(credentialed live execution ofITNightlyBigQueryTestrequiresGOOGLE_APPLICATION_CREDENTIALSin CI).