From b5b8c3c8d65937365be2e36a777458ab7026389f Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 9 Oct 2026 09:56:53 -0700 Subject: [PATCH 01/13] feat: add 3.15 support to pyarrow packages --- .../bigquery-storage-integration.yaml | 14 -------------- packages/bigquery-magics/noxfile.py | 5 ----- packages/bigquery-magics/setup.py | 1 + packages/db-dtypes/noxfile.py | 3 --- packages/db-dtypes/setup.py | 1 + packages/google-cloud-bigquery-storage/noxfile.py | 3 --- packages/google-cloud-bigquery/noxfile.py | 9 --------- .../google-cloud-documentai-toolbox/noxfile.py | 5 ----- packages/google-cloud-documentai-toolbox/setup.py | 1 + packages/pandas-gbq/noxfile.py | 5 ----- packages/pandas-gbq/setup.py | 1 + packages/sqlalchemy-bigquery/noxfile.py | 3 --- packages/sqlalchemy-bigquery/setup.py | 1 + 13 files changed, 5 insertions(+), 47 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml b/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml index b0d7677af2cb..329f17624d39 100644 --- a/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml @@ -525,17 +525,3 @@ replacements: bigquery_storage_v1alpha/types_\n\n Changelog count: 1 - - paths: [ - packages/google-cloud-bigquery-storage/noxfile.py, - ] - before: | - # Install all test dependencies, then install this package in-place.\n - constraints_path = str\( - after: | - # Install all test dependencies, then install this package in-place. - - if session.python == "3.15": - session.skip("Skipping 3.15 until wheels are available for pyarrow.") - - constraints_path = str( - count: 1 diff --git a/packages/bigquery-magics/noxfile.py b/packages/bigquery-magics/noxfile.py index 1b6f820f1c03..19f9bc94a935 100644 --- a/packages/bigquery-magics/noxfile.py +++ b/packages/bigquery-magics/noxfile.py @@ -252,11 +252,6 @@ def install_unittest_dependencies(session, *constraints): @nox.session(python=UNIT_TEST_PYTHON_VERSIONS) def unit(session): # Install all test dependencies, then install this package in-place. - if session.python == "3.15": - session.skip( - "Skipping 3.15 until wheels are available for pyproj needed for dependency geopandas" - ) - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) diff --git a/packages/bigquery-magics/setup.py b/packages/bigquery-magics/setup.py index ae1caecf8a0e..e37dd60ec3e9 100644 --- a/packages/bigquery-magics/setup.py +++ b/packages/bigquery-magics/setup.py @@ -111,6 +111,7 @@ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/packages/db-dtypes/noxfile.py b/packages/db-dtypes/noxfile.py index e4f43fa955f6..e60217dfe0fd 100644 --- a/packages/db-dtypes/noxfile.py +++ b/packages/db-dtypes/noxfile.py @@ -317,9 +317,6 @@ def prerelease(session, tests_path): @nox.parametrize("test_type", ["unit", "compliance"]) def unit(session, test_type): """Run the unit test suite.""" - if session.python == "3.15": - session.skip("Skipping 3.15 until wheels are available for pyarrow.") - # Compliance tests only run on the latest Python version if test_type == "compliance" and session.python != DEFAULT_PYTHON_VERSION: session.skip( diff --git a/packages/db-dtypes/setup.py b/packages/db-dtypes/setup.py index a6005a83303f..7b040d8e1e56 100644 --- a/packages/db-dtypes/setup.py +++ b/packages/db-dtypes/setup.py @@ -69,6 +69,7 @@ def readme(): "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Operating System :: OS Independent", "Topic :: Database :: Front-Ends", ], diff --git a/packages/google-cloud-bigquery-storage/noxfile.py b/packages/google-cloud-bigquery-storage/noxfile.py index 2d8a4115d9f6..b7bab49cb829 100644 --- a/packages/google-cloud-bigquery-storage/noxfile.py +++ b/packages/google-cloud-bigquery-storage/noxfile.py @@ -294,9 +294,6 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if session.python == "3.15": - session.skip("Skipping 3.15 until wheels are available for pyarrow.") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) diff --git a/packages/google-cloud-bigquery/noxfile.py b/packages/google-cloud-bigquery/noxfile.py index af201dfb8a05..88dc5bd2daf1 100644 --- a/packages/google-cloud-bigquery/noxfile.py +++ b/packages/google-cloud-bigquery/noxfile.py @@ -180,15 +180,6 @@ def default(session, install_extras=True): @_calculate_duration def unit(session, test_type): """Run the unit test suite.""" - # TODO(https://github.com/googleapis/google-cloud-python/issues/17741): - # remove this skip once the optional extras resolve on 3.15. - # `unit_noextras` can be tested on 3.15 - if session.python == "3.15" and test_type == "unit": - session.skip( - "Optional extras do not yet resolve on 3.15; " - "unit_noextras covers the core install." - ) - install_extras = True if test_type == "unit_noextras": # unit_noextras only runs on the oldest and newest Python versions diff --git a/packages/google-cloud-documentai-toolbox/noxfile.py b/packages/google-cloud-documentai-toolbox/noxfile.py index 90e8938fdaa6..e6ac183ea803 100644 --- a/packages/google-cloud-documentai-toolbox/noxfile.py +++ b/packages/google-cloud-documentai-toolbox/noxfile.py @@ -214,11 +214,6 @@ def install_unittest_dependencies(session, *constraints): ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if session.python == "3.15": - session.skip( - "Skipping 3.15 until wheels are available for 1. numba (from dependency pandas[performance]) 2. lxml (from dependency pikepdf) 3. pyarrow." - ) - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) diff --git a/packages/google-cloud-documentai-toolbox/setup.py b/packages/google-cloud-documentai-toolbox/setup.py index 5842ac56fbcf..c00355515cfd 100644 --- a/packages/google-cloud-documentai-toolbox/setup.py +++ b/packages/google-cloud-documentai-toolbox/setup.py @@ -84,6 +84,7 @@ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules", ], diff --git a/packages/pandas-gbq/noxfile.py b/packages/pandas-gbq/noxfile.py index 55052afb13a4..4d9f7393da5c 100644 --- a/packages/pandas-gbq/noxfile.py +++ b/packages/pandas-gbq/noxfile.py @@ -268,11 +268,6 @@ def default(session): @_calculate_duration def unit(session): """Run the unit test suite.""" - if session.python == "3.15": - session.skip( - "Skipping 3.15 until wheels are available for pyarrow. Also pyproj wheels are needed for dependency geopandas." - ) - default(session) diff --git a/packages/pandas-gbq/setup.py b/packages/pandas-gbq/setup.py index 99e69c3e8192..1f26d9df0c8d 100644 --- a/packages/pandas-gbq/setup.py +++ b/packages/pandas-gbq/setup.py @@ -93,6 +93,7 @@ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Operating System :: OS Independent", "Topic :: Internet", "Topic :: Scientific/Engineering", diff --git a/packages/sqlalchemy-bigquery/noxfile.py b/packages/sqlalchemy-bigquery/noxfile.py index c99032072a4a..ccc59a494b32 100644 --- a/packages/sqlalchemy-bigquery/noxfile.py +++ b/packages/sqlalchemy-bigquery/noxfile.py @@ -303,9 +303,6 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation, install_extras=True): # Install all test dependencies, then install this package in-place. - if session.python == "3.15": - session.skip("Skipping 3.15 until wheels are available for pyarrow.") - constraints_path = str( CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" ) diff --git a/packages/sqlalchemy-bigquery/setup.py b/packages/sqlalchemy-bigquery/setup.py index da3970b2a0b9..7ce867b7e264 100644 --- a/packages/sqlalchemy-bigquery/setup.py +++ b/packages/sqlalchemy-bigquery/setup.py @@ -105,6 +105,7 @@ def readme(): "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Operating System :: OS Independent", "Topic :: Database :: Front-Ends", ], From d715a1481f70db73da6762260a47727666c8baf7 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 9 Oct 2026 10:28:48 -0700 Subject: [PATCH 02/13] disable pre-releases for 3.15 --- .github/workflows/unittest.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index a7006861b623..07e54b3a717c 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -132,11 +132,6 @@ jobs: - name: Install nox and nox-uv run: | uv pip install --system nox nox-uv - # TODO(https://github.com/googleapis/google-cloud-python/issues/18532): - # Remove UV_PRERELEASE once Python 3.15 is officially released and upstream binary wheels are available. - - name: Enable prereleases for Python 3.15 - if: matrix.python == '3.15' - run: echo "UV_PRERELEASE=allow" >> $GITHUB_ENV - name: Run unit tests for ${{ matrix.package_shard.description }} env: BUILD_TYPE: presubmit From 207c2731d0294fce529e96c83aee7ee6132edd93 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 9 Oct 2026 10:45:40 -0700 Subject: [PATCH 03/13] bump pandas version --- .../client-post-processing/bigquery-storage-integration.yaml | 2 +- packages/google-cloud-bigquery-storage/setup.py | 2 +- packages/google-cloud-documentai-toolbox/setup.py | 4 ++-- .../testing/constraints-3.15.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml b/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml index 329f17624d39..3a5ce0d79ba7 100644 --- a/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml @@ -131,7 +131,7 @@ replacements: after: | extras = { "pandas": [ - "pandas >= 1.1.3, < 3.0.0", + "pandas >= 1.1.3, < 4.0.0", "pyarrow >= 3.0.0", "pandas-gbq >= 0.35.1, < 2.0.0", ], diff --git a/packages/google-cloud-bigquery-storage/setup.py b/packages/google-cloud-bigquery-storage/setup.py index 14dd4c5dd0bc..2fd9cb456870 100644 --- a/packages/google-cloud-bigquery-storage/setup.py +++ b/packages/google-cloud-bigquery-storage/setup.py @@ -55,7 +55,7 @@ ] extras = { "pandas": [ - "pandas >= 1.1.3, < 3.0.0", + "pandas >= 1.1.3, < 4.0.0", "pyarrow >= 3.0.0", "pandas-gbq >= 0.35.1, < 2.0.0", ], diff --git a/packages/google-cloud-documentai-toolbox/setup.py b/packages/google-cloud-documentai-toolbox/setup.py index c00355515cfd..b5c183716221 100644 --- a/packages/google-cloud-documentai-toolbox/setup.py +++ b/packages/google-cloud-documentai-toolbox/setup.py @@ -55,9 +55,9 @@ install_requires=( "google-api-core>=2.25.0, <3.0.0", # For Python < 3.15: Install with performance extras (which includes numba) - "pandas[performance,gcp]>=2.0.0, <3.0.0; python_version < '3.15'", + "pandas[performance,gcp]>=2.0.0, <4.0.0; python_version < '3.15'", # pandas[performance] requires numba which does not have 3.15 support yet - "pandas[gcp]>=2.0.0, <3.0.0;python_version>='3.15'", + "pandas[gcp]>=2.0.0, <4.0.0;python_version>='3.15'", # pyarrow is transitive dependency; not accessed by the library directly "pyarrow>=15.0.0", "tabulate>=0.9.0, <1.0.0", diff --git a/packages/google-cloud-documentai-toolbox/testing/constraints-3.15.txt b/packages/google-cloud-documentai-toolbox/testing/constraints-3.15.txt index af6f7f358d70..21e9b11b45f8 100644 --- a/packages/google-cloud-documentai-toolbox/testing/constraints-3.15.txt +++ b/packages/google-cloud-documentai-toolbox/testing/constraints-3.15.txt @@ -10,4 +10,4 @@ google-cloud-documentai google-cloud-storage numpy pikepdf -numba>=0.63.0b1 +numba From 73ecb00d37b342217e52241ae7728bcc61c3c84e Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Fri, 9 Oct 2026 10:45:50 -0700 Subject: [PATCH 04/13] added warning ignore --- packages/google-cloud-documentai-toolbox/pytest.ini | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/google-cloud-documentai-toolbox/pytest.ini b/packages/google-cloud-documentai-toolbox/pytest.ini index 8b8d46c08c6c..4c9881c039ca 100644 --- a/packages/google-cloud-documentai-toolbox/pytest.ini +++ b/packages/google-cloud-documentai-toolbox/pytest.ini @@ -14,3 +14,7 @@ filterwarnings = # This error is expected for python versions that approach EOL ignore:.*Please upgrade to the latest Python version.*:FutureWarning ignore:(?s).*using a Python version.*past its end of life.*:FutureWarning + + # Python 3.15 base64.urlsafe_b64decode emits FutureWarning when protobuf json_format + # decodes standard base64 bytes fields containing '+' or '/' + ignore:invalid character .* in URL-safe Base64 data will be discarded in future Python versions:FutureWarning From 100072a6cbdb3fdf91a713c7d8378ad62730b314 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 15 Oct 2026 16:20:13 +0000 Subject: [PATCH 05/13] avoid mismatch between system test runtime and compliance test runtime --- packages/sqlalchemy-bigquery/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sqlalchemy-bigquery/noxfile.py b/packages/sqlalchemy-bigquery/noxfile.py index ccc59a494b32..f77ed05f9b4b 100644 --- a/packages/sqlalchemy-bigquery/noxfile.py +++ b/packages/sqlalchemy-bigquery/noxfile.py @@ -473,7 +473,7 @@ def system_noextras(session): _run_system_test_logic(session, "system_noextras") -@nox.session(python=DEFAULT_PYTHON_VERSION, venv_backend=VENV_BACKEND) +@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS, venv_backend=VENV_BACKEND) @_calculate_duration def compliance(session): """Run the SQLAlchemy dialect-compliance system tests""" From 97ac7a6835ab892af8130ca955875a84dface95a Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 15 Oct 2026 12:20:34 -0400 Subject: [PATCH 06/13] Update packages/google-cloud-documentai-toolbox/setup.py --- packages/google-cloud-documentai-toolbox/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-documentai-toolbox/setup.py b/packages/google-cloud-documentai-toolbox/setup.py index b5c183716221..251edf80029b 100644 --- a/packages/google-cloud-documentai-toolbox/setup.py +++ b/packages/google-cloud-documentai-toolbox/setup.py @@ -54,7 +54,6 @@ }, install_requires=( "google-api-core>=2.25.0, <3.0.0", - # For Python < 3.15: Install with performance extras (which includes numba) "pandas[performance,gcp]>=2.0.0, <4.0.0; python_version < '3.15'", # pandas[performance] requires numba which does not have 3.15 support yet "pandas[gcp]>=2.0.0, <4.0.0;python_version>='3.15'", From b0b0d6aeabb8e74c2bec55ebfdf468749d438579 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 15 Oct 2026 12:20:43 -0400 Subject: [PATCH 07/13] Update packages/google-cloud-documentai-toolbox/setup.py --- packages/google-cloud-documentai-toolbox/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-documentai-toolbox/setup.py b/packages/google-cloud-documentai-toolbox/setup.py index 251edf80029b..9d908ae7fb07 100644 --- a/packages/google-cloud-documentai-toolbox/setup.py +++ b/packages/google-cloud-documentai-toolbox/setup.py @@ -55,7 +55,6 @@ install_requires=( "google-api-core>=2.25.0, <3.0.0", "pandas[performance,gcp]>=2.0.0, <4.0.0; python_version < '3.15'", - # pandas[performance] requires numba which does not have 3.15 support yet "pandas[gcp]>=2.0.0, <4.0.0;python_version>='3.15'", # pyarrow is transitive dependency; not accessed by the library directly "pyarrow>=15.0.0", From aba728f6a1d6e287f38330ab790d95c3dd682691 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 15 Oct 2026 12:20:51 -0400 Subject: [PATCH 08/13] Update packages/google-cloud-documentai-toolbox/setup.py --- packages/google-cloud-documentai-toolbox/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-cloud-documentai-toolbox/setup.py b/packages/google-cloud-documentai-toolbox/setup.py index 9d908ae7fb07..8ab5b74dd5c4 100644 --- a/packages/google-cloud-documentai-toolbox/setup.py +++ b/packages/google-cloud-documentai-toolbox/setup.py @@ -55,7 +55,6 @@ install_requires=( "google-api-core>=2.25.0, <3.0.0", "pandas[performance,gcp]>=2.0.0, <4.0.0; python_version < '3.15'", - "pandas[gcp]>=2.0.0, <4.0.0;python_version>='3.15'", # pyarrow is transitive dependency; not accessed by the library directly "pyarrow>=15.0.0", "tabulate>=0.9.0, <1.0.0", From ec72ab7d965227051532456caed8dea8738d2800 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 15 Oct 2026 12:21:26 -0400 Subject: [PATCH 09/13] Update packages/google-cloud-documentai-toolbox/setup.py --- packages/google-cloud-documentai-toolbox/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-documentai-toolbox/setup.py b/packages/google-cloud-documentai-toolbox/setup.py index 8ab5b74dd5c4..fb98c43de888 100644 --- a/packages/google-cloud-documentai-toolbox/setup.py +++ b/packages/google-cloud-documentai-toolbox/setup.py @@ -54,7 +54,7 @@ }, install_requires=( "google-api-core>=2.25.0, <3.0.0", - "pandas[performance,gcp]>=2.0.0, <4.0.0; python_version < '3.15'", + "pandas[performance,gcp]>=2.0.0, <4.0.0", # pyarrow is transitive dependency; not accessed by the library directly "pyarrow>=15.0.0", "tabulate>=0.9.0, <1.0.0", From f117ad33447dd70ceb69f805d7dcdaa9354027d8 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 15 Oct 2026 18:29:15 +0000 Subject: [PATCH 10/13] Revert "avoid mismatch between system test runtime and compliance test runtime" This reverts commit 100072a6cbdb3fdf91a713c7d8378ad62730b314. --- packages/sqlalchemy-bigquery/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sqlalchemy-bigquery/noxfile.py b/packages/sqlalchemy-bigquery/noxfile.py index f77ed05f9b4b..ccc59a494b32 100644 --- a/packages/sqlalchemy-bigquery/noxfile.py +++ b/packages/sqlalchemy-bigquery/noxfile.py @@ -473,7 +473,7 @@ def system_noextras(session): _run_system_test_logic(session, "system_noextras") -@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS, venv_backend=VENV_BACKEND) +@nox.session(python=DEFAULT_PYTHON_VERSION, venv_backend=VENV_BACKEND) @_calculate_duration def compliance(session): """Run the SQLAlchemy dialect-compliance system tests""" From 99ad4e62c848a5c6a3ad1aee07e8749dc2635e95 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 15 Oct 2026 18:33:14 +0000 Subject: [PATCH 11/13] fix build --- .../test_dialect_compliance.py | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py b/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py index b449de2d9aec..f12a19902229 100644 --- a/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py +++ b/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py @@ -271,6 +271,49 @@ def test_floordiv_integer(self): def test_floordiv_integer_bound(self): pass + @pytest.mark.skip("BQ rounds based on datatype") + def test_floordiv_integer_bound(self): + pass + + @pytest.mark.skip( + "Skip 38-Digit Typed Divisor: BigQuery's SQL compiler evaluates raw, unquoted " + "integer sequences as INT64 *before* executing casting wrappers like CAST(). " + "Because 30000000000000000000000000000000000000 exceeds standard signed 64-bit " + "boundaries (maximum value: 9223372036854775807), the parser throws an immediate " + "syntax-level 'Invalid integer literal' error. Solving this requires the dialect compiler " + "to natively serialize large Python Decimal objects as string-quoted SQL literals ('30000...')." + ) + def test_truediv_divisor_numeric_38_digit_divisor_typed(self): + pass + + @pytest.mark.skip( + "Skip 38-Digit Untyped Divisor: Similar to the typed variant, BigQuery's lexical analyzer " + "overflows on unquoted digit strings exceeding 64-bit thresholds. Because SQLAlchemy's " + "untyped compilation strategy outputs these Python Decimal structures as raw digit text, " + "the SQL engine throws a BadRequest 'Invalid integer literal' exception at the parsing step." + ) + def test_truediv_divisor_numeric_38_digit_divisor_untyped_function(self): + pass + + @pytest.mark.skip( + "Skip Untyped Many Decimals: When wrap_divisor is a lambda (an untyped function), SQLAlchemy " + "leaves compiled math expressions uncoerced. Intermediate division calculations on BigQuery standard " + "NUMERIC types then fall back to standard FLOAT64 representation behaviors or lower-precision scales, " + "resulting in floating-point math inaccuracies (e.g., returning 7.00000000447 instead of the expected 7)." + ) + def test_truediv_divisor_numeric_many_decimals_untyped_function(self): + pass + + @pytest.mark.skip( + "Skip Untyped Tiny Divisor: BigQuery's standard NUMERIC type has a strict scale ceiling of " + "9 decimal places (unlike BIGNUMERIC which supports up to 38 decimal places). When an untyped " + "divisor contains a high-precision value like 0.00000000000012345679 (with 13 decimal places), " + "the SQL engine's intermediate casting to NUMERIC rounds the value all the way down to 0, " + "consequently triggering a 400 Bad Request 'division by zero' exception." + ) + def test_truediv_divisor_numeric_tiny_divisor_untyped_function(self): + pass + class SimpleUpdateDeleteTest(_SimpleUpdateDeleteTest): """The base tests fail if operations return rows for some reason.""" From f060748f522810b0d9fe8c20295de1bccbc0966e Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 15 Oct 2026 18:50:07 +0000 Subject: [PATCH 12/13] remove duplicate entry --- .../sqlalchemy_dialect_compliance/test_dialect_compliance.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py b/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py index f12a19902229..497ef9624cf2 100644 --- a/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py +++ b/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py @@ -271,10 +271,6 @@ def test_floordiv_integer(self): def test_floordiv_integer_bound(self): pass - @pytest.mark.skip("BQ rounds based on datatype") - def test_floordiv_integer_bound(self): - pass - @pytest.mark.skip( "Skip 38-Digit Typed Divisor: BigQuery's SQL compiler evaluates raw, unquoted " "integer sequences as INT64 *before* executing casting wrappers like CAST(). " From 5ba229044ef987e81c71d3303443a5f3f2990c7b Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 16 Oct 2026 17:00:32 +0000 Subject: [PATCH 13/13] fix build --- .../test_dialect_compliance.py | 49 ++++++------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py b/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py index 497ef9624cf2..8ede96497c11 100644 --- a/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py +++ b/packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py @@ -272,42 +272,21 @@ def test_floordiv_integer_bound(self): pass @pytest.mark.skip( - "Skip 38-Digit Typed Divisor: BigQuery's SQL compiler evaluates raw, unquoted " - "integer sequences as INT64 *before* executing casting wrappers like CAST(). " - "Because 30000000000000000000000000000000000000 exceeds standard signed 64-bit " - "boundaries (maximum value: 9223372036854775807), the parser throws an immediate " - "syntax-level 'Invalid integer literal' error. Solving this requires the dialect compiler " - "to natively serialize large Python Decimal objects as string-quoted SQL literals ('30000...')." + "Skipped due to BigQuery Standard SQL limitations with extreme decimal/numeric inputs:\n" + "1. 38-Digit Integer Literal Overflows: BigQuery's SQL parser lexically evaluates " + "unquoted digit sequences without a decimal point as INT64 *before* evaluating " + "CAST() wrappers. Values like 30000000000000000000000000000000000000 overflow " + "signed 64-bit integer limits (max: 9,223,372,036,854,775,807) and raise a 400 " + "'Invalid integer literal' error unless quoted as strings.\n" + "2. Untyped Tiny Divisor Underflow: Standard NUMERIC in BigQuery is capped at 9 " + "decimal places (whereas BIGNUMERIC supports 38). When untyped functions (like " + "nullif) cast a 13-decimal divisor (0.00000000000012345679) to NUMERIC, it " + "rounds down to 0 and triggers a 400 division-by-zero error.\n" + "3. Untyped Precision Loss: Coercing high-precision operands to standard NUMERIC " + "during untyped division causes trailing precision mismatches " + "(e.g., returning 7.00000000447361540043026119825490002512 instead of 7)." ) - def test_truediv_divisor_numeric_38_digit_divisor_typed(self): - pass - - @pytest.mark.skip( - "Skip 38-Digit Untyped Divisor: Similar to the typed variant, BigQuery's lexical analyzer " - "overflows on unquoted digit strings exceeding 64-bit thresholds. Because SQLAlchemy's " - "untyped compilation strategy outputs these Python Decimal structures as raw digit text, " - "the SQL engine throws a BadRequest 'Invalid integer literal' exception at the parsing step." - ) - def test_truediv_divisor_numeric_38_digit_divisor_untyped_function(self): - pass - - @pytest.mark.skip( - "Skip Untyped Many Decimals: When wrap_divisor is a lambda (an untyped function), SQLAlchemy " - "leaves compiled math expressions uncoerced. Intermediate division calculations on BigQuery standard " - "NUMERIC types then fall back to standard FLOAT64 representation behaviors or lower-precision scales, " - "resulting in floating-point math inaccuracies (e.g., returning 7.00000000447 instead of the expected 7)." - ) - def test_truediv_divisor_numeric_many_decimals_untyped_function(self): - pass - - @pytest.mark.skip( - "Skip Untyped Tiny Divisor: BigQuery's standard NUMERIC type has a strict scale ceiling of " - "9 decimal places (unlike BIGNUMERIC which supports up to 38 decimal places). When an untyped " - "divisor contains a high-precision value like 0.00000000000012345679 (with 13 decimal places), " - "the SQL engine's intermediate casting to NUMERIC rounds the value all the way down to 0, " - "consequently triggering a 400 Bad Request 'division by zero' exception." - ) - def test_truediv_divisor_numeric_tiny_divisor_untyped_function(self): + def test_truediv_divisor(self): pass class SimpleUpdateDeleteTest(_SimpleUpdateDeleteTest):