Skip to content

SNOW-3225365: Replace redundant assert_connection_is_open calls with pass#603

Open
sfc-gh-fpawlowski wants to merge 7 commits intomainfrom
SNOW-3225365/remove-assert-connection
Open

SNOW-3225365: Replace redundant assert_connection_is_open calls with pass#603
sfc-gh-fpawlowski wants to merge 7 commits intomainfrom
SNOW-3225365/remove-assert-connection

Conversation

@sfc-gh-fpawlowski
Copy link
Contributor

Summary

  • Every e2e test was executing a SELECT 1 round-trip via assert_connection_is_open before its actual test logic — one wasted network call per test
  • Replace all 23 call sites with pass so the BDD "Given Snowflake client is logged in" step retains an implementation (required by tests-format-validator) without making a redundant network round-trip
  • Clean up now-unused assert_connection_is_open imports in each file
  • The function definition in utils.py is kept intact

What does NOT change

  • auth_helpers.pyverify_simple_query_execution uses SELECT 1 to verify auth succeeded; intentionally kept
  • All test logic, fixtures, and schema setup — unchanged

Test plan

  • pytest python/tests/e2e/ -x -q --no-header — full e2e suite passes
  • Pre-commit hooks pass (tests-format-validator, ruff, mypy)

🤖 Generated with Claude Code

…pass

Every test was executing a SELECT 1 round-trip via assert_connection_is_open
before its actual logic, wasting one network call per test.

Replace all 23 call sites with a no-op pass statement so the "Given Snowflake
client is logged in" BDD step still has an implementation (required by the
tests-format-validator) without making a redundant network round-trip.
Clean up the now-unused assert_connection_is_open imports.

The function definition in utils.py is kept intact.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@sfc-gh-fpawlowski sfc-gh-fpawlowski requested a review from a team as a code owner March 18, 2026 23:06
Copilot AI review requested due to automatic review settings March 18, 2026 23:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Python e2e test suite to eliminate redundant assert_connection_is_open(execute_query) calls (which executed a SELECT 1 round-trip) while keeping the Gherkin-style “Given Snowflake client is logged in” step non-empty for tests-format-validator.

Changes:

  • Replaced assert_connection_is_open(execute_query) call sites with pass no-ops in e2e tests to remove the extra SELECT 1 query.
  • Removed now-unused assert_connection_is_open imports from affected test modules.
  • Left the assert_connection_is_open helper definition intact (per PR description) for other intentional uses.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
python/tests/e2e/types/test_timestamp_ntz.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_timestamp_ltz.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_string.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_string_lob.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_number.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_number_numpy.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_int.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_float.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_float_numpy.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_decfloat.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_decfloat_numpy.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_boolean.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_boolean_numpy.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_binary.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/types/test_binary_lob.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/tls/test_crl_enabled.py Removes assert_connection_is_open import and replaces Given-step call with pass.
python/tests/e2e/query/test_parameter_binding.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/query/test_large_result_set.py Removes assert_connection_is_open import and replaces Given-step call with pass.
python/tests/e2e/query/test_client_side_binding.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/query/test_basic_execute_query.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/put_get/test_put_get_source_compression.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/put_get/test_put_get_basic_operations.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.
python/tests/e2e/put_get/test_put_get_auto_compress.py Removes assert_connection_is_open import and replaces Given-step call sites with pass.

sfc-gh-fpawlowski and others added 2 commits March 18, 2026 23:35
Follow-up to the assert_connection_is_open removal:

- put_get and tls tests: move "# Given Snowflake client is logged in"
  above the `with connection.cursor()` / `with connection_factory()` block
  so the step has a real implementation (the with-statement) rather than
  a no-op pass. Also drop the now-unused execute_query fixture parameter
  from these test functions.

- class-based type and query tests: remove the "# Given Snowflake client
  is logged in" comment and pass entirely. The connection is implicitly
  established by the execute_query/cursor fixtures; a separate BDD step
  for it adds noise without value.

- feature files: remove the "Given Snowflake client is logged in" step
  from Python-specific and shared feature files where the Python tests
  no longer implement it. Keeps the step in put_get/tls feature files
  where the with-block still serves as the implementation.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…eature files

Replace every `pass` placeholder (used as Given step filler) with real
implementation code:
- Simple query tests: extract SQL string into `sql = "..."` variable
- Table tests: hoist `table_name = f"{tmp_schema}.xxx"` before the And step
- Parametrize tests (sql is a fixture param): use `assert callable(execute_query)`
- Multiline SQL expressions collected in full via paren-depth tracking

Restore all .feature files to main state, reverting the incorrect removals
of Given step lines introduced in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings March 19, 2026 10:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

def test_should_handle_case_exponent_values_from_literals(self, execute_query, sql, expected):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
assert callable(execute_query)
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The # Given Snowflake client is logged in step is currently implemented as assert callable(execute_query), which doesn’t add meaningful test value and is easy to misinterpret as an actual login check. Prefer an explicit no-op (e.g., pass) to document intent and keep the step implementation consistent with the rest of this PR’s approach.

Suggested change
assert callable(execute_query)
pass

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@sfc-gh-pczajka sfc-gh-pczajka left a comment

Choose a reason for hiding this comment

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

Putting random code under # Given Snowflake client is logged in makes the test hard to read.
How about replacing definition of "assert_connection_is_open" to assert not connection.is_closed()?

sfc-gh-fpawlowski and others added 2 commits March 20, 2026 11:34
…e was misplaced

In 8 test methods, code was hoisted to the Given step even though a
method-level explanatory comment appeared above it in the original. This
left the comment stranded after the code it described, making it
contextually wrong.

Restore the correct order: explanatory comment before Given, `pass` as
the Given implementation (there is no meaningful code to hoist that
would not displace the comment), and the code back in its original step.

Affected methods:
- test_binary.py: test_should_select_binary_with_specified_length_from_table,
  test_should_select_binary_literals_using_parameter_binding
- test_binary_lob.py: both LOB size limit tests
- test_string.py: corner case literals test, parameter binding test
- test_string_lob.py: both LOB size limit tests

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… in Given

In test_basic_execute_query.py, test_client_side_binding.py,
test_parameter_binding.py and test_decfloat.py the transformer had
hoisted the method docstring to serve as the Given step implementation,
leaving it after the # Given comment instead of as the first statement.

Restore the docstrings to their correct first-statement position and use
pass as the Given implementation, consistent with other methods where
there is no meaningful code to hoist without displacing context.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings March 20, 2026 14:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 9 comments.

Comment on lines 121 to 127
# When Query selecting corner case string literals is executed
type_cast = f"::{string_type}(32)"
results = [execute_query(f"SELECT {sql_val}{type_cast}", single_row=True) for _, sql_val in CORNER_CASE_VALUES]

# Then the result should contain expected corner case string values
for expected_val, sql_val in CORNER_CASE_VALUES:
result = execute_query(f"SELECT {sql_val}{type_cast}", single_row=True)
for (expected_val, _), result in zip(CORNER_CASE_VALUES, results):
assert result == (expected_val,), f"Expected {expected_val!r}, got {result[0]!r}"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

In test_should_select_string_literals_with_corner_case_values, building results separately and then iterating with zip() can hide issues: zip() will silently truncate if CORNER_CASE_VALUES and results ever diverge, and query failures in the list comprehension won’t indicate which corner case triggered them. Consider executing/asserting inside a single loop (or use zip(..., strict=True) if you keep this structure) to preserve per-case context and avoid silent truncation.

Copilot uses AI. Check for mistakes.
Comment on lines 163 to 168
def test_should_handle_null_values_in_parameter_binding(self, execute_query, cursor):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
cursor.execute("SELECT ?, ?, ?", (None, 42, None))

# When Query "SELECT ?, ?, ?" is executed with parameters [None, 42, None]
cursor.execute("SELECT ?, ?, ?", (None, 42, None))
result = cursor.fetchone()
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This test executes the query in the “Given” section (before the “When” comment), so the BDD-style comments no longer match the control flow. Consider moving the cursor.execute(...) call down under the “When” step to keep the narrative accurate.

Copilot uses AI. Check for mistakes.
Comment on lines 192 to 198
def test_should_handle_unicode_characters_in_parameter_binding(self, execute_query, cursor):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
cursor.execute("SELECT ?::VARCHAR, ?::VARCHAR", ("日本語", "⛄"))

# When Query "SELECT ?::VARCHAR, ?::VARCHAR" is executed with parameters ["日本語", "⛄"]
cursor.execute("SELECT ?::VARCHAR, ?::VARCHAR", ("日本語", "⛄"))
result = cursor.fetchone()

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This test now calls cursor.execute(...) before the “When” comment, which makes the BDD-style step comments misleading. Consider moving the execute call to immediately follow the “When” step for consistency/readability.

Copilot uses AI. Check for mistakes.
Comment on lines 202 to 208
def test_should_bind_zero_values(self, execute_query, cursor):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
cursor.execute("SELECT ?, ?::FLOAT, ?::VARCHAR", (0, 0.0, ""))

# When Query "SELECT ?, ?::FLOAT, ?::VARCHAR" is executed with parameters [0, 0.0, ""]
cursor.execute("SELECT ?, ?::FLOAT, ?::VARCHAR", (0, 0.0, ""))
result = cursor.fetchone()

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This test now executes the query in the “Given” step and only fetches in the “When” step, which makes the step comments inaccurate. Consider moving the cursor.execute(...) call below the “When” comment so the narrative matches the code.

Copilot uses AI. Check for mistakes.
Comment on lines 212 to 218
def test_should_handle_mixed_type_casting_with_parameter_binding(self, execute_query, cursor):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
cursor.execute("SELECT ?::NUMBER, ?::VARCHAR, ?::BOOLEAN", (42, "hello", True))

# When Query "SELECT ?::NUMBER, ?::VARCHAR, ?::BOOLEAN" is executed with parameters [42, "hello", True]
cursor.execute("SELECT ?::NUMBER, ?::VARCHAR, ?::BOOLEAN", (42, "hello", True))
result = cursor.fetchone()

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The query execution happens before the “When” comment, so the BDD-style steps are out of order. Consider moving the cursor.execute(...) call under the “When” comment to keep the scenario description accurate.

Copilot uses AI. Check for mistakes.
Comment on lines 222 to 228
def test_should_raise_error_when_placeholder_count_mismatches_argument_count(self, execute_query, cursor):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
cursor.execute("SELECT ?, ?", (1, 2, 3))

# When Query with 2 placeholders is executed with 3 arguments
cursor.execute("SELECT ?, ?", (1, 2, 3))
result = cursor.fetchone()

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This test executes cursor.execute("SELECT ?, ?", ...) before the “When” comment, so the step comments don’t reflect the actual order of operations. Consider moving the execute call under the “When” step for clarity.

Copilot uses AI. Check for mistakes.

# When Query "SELECT DATEADD(second, ROW_NUMBER() OVER (ORDER BY seq8()) - 1,
# '2024-01-01 00:00:00'::TIMESTAMP_NTZ) as ts
# FROM TABLE(GENERATOR(ROWCOUNT => 50000)) ORDER BY ts" is executed
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The “When Query … ORDER BY ts” comment doesn’t match the actual SQL (ORDER BY 1). Updating the comment (or the SQL) would avoid confusion when diagnosing failures.

Suggested change
# FROM TABLE(GENERATOR(ROWCOUNT => 50000)) ORDER BY ts" is executed
# FROM TABLE(GENERATOR(ROWCOUNT => 50000)) ORDER BY 1" is executed

Copilot uses AI. Check for mistakes.

# When Query "SELECT DATEADD(second, ROW_NUMBER() OVER (ORDER BY seq8()) - 1,
# '2024-01-01 00:00:00 +00:00'::TIMESTAMP_LTZ) as ts
# FROM TABLE(GENERATOR(ROWCOUNT => 50000)) ORDER BY ts" is executed
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The “When Query … ORDER BY ts” comment doesn’t match the actual SQL (ORDER BY 1). Consider updating the comment (or SQL) so the documented query matches what’s executed.

Suggested change
# FROM TABLE(GENERATOR(ROWCOUNT => 50000)) ORDER BY ts" is executed
# FROM TABLE(GENERATOR(ROWCOUNT => 50000)) ORDER BY 1" is executed

Copilot uses AI. Check for mistakes.
Comment on lines 53 to +58
def test_should_cast_timestamp_ntz_values_to_appropriate_type(self, execute_query):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
sql = f"SELECT '{TS_2024_JAN_STR}'::TIMESTAMP_NTZ"

# When Query "SELECT '2024-01-15 10:30:00'::TIMESTAMP_NTZ" is executed
result = execute_query(f"SELECT '{TS_2024_JAN_STR}'::TIMESTAMP_NTZ", single_row=True)
result = execute_query(sql, single_row=True)
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

PR description says all assert_connection_is_open call sites were replaced with pass, but in several places (including here) the replacement is an assignment (e.g., sql = ...) rather than pass. Consider updating the PR description to reflect the actual pattern (removal of the redundant query, with the “Given” step implemented by a no-op or local variable setup).

Copilot uses AI. Check for mistakes.
sfc-gh-fpawlowski and others added 2 commits March 20, 2026 14:57
…ll step comment

Variables hoisted to Given implementations were left before step comments.
Move sql= / table_name= back to after all continuation lines of their step,
and use pass as the honest Given implementation.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Two methods had sql= hoisted under # Given with a method-level comment
placed after it, which the de-hoisting script missed. Restore the
method-level comment to before Given and move sql= to after When.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings March 20, 2026 15:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 6 comments.

class TestSelectQueries:
"""Tests for basic SELECT query execution."""

def test_should_execute_simple_select_returning_single_value(self, execute_query, cursor):
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

After replacing assert_connection_is_open(execute_query) with pass, the execute_query fixture argument is no longer referenced in the test body. If ruff/lint rules for unused arguments are enabled, this can fail linting. Consider renaming the parameter to _execute_query (to keep requesting the fixture) or removing it if it’s not needed for setup in this file.

Copilot uses AI. Check for mistakes.

# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
pass
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

After replacing assert_connection_is_open(execute_query) with pass, the execute_query fixture argument is no longer referenced in the test body. If ruff/lint rules for unused arguments are enabled, this can fail linting. Consider renaming the parameter to _execute_query (to keep requesting the fixture) or removing it if it’s not needed for setup in this file.

Copilot uses AI. Check for mistakes.


class TestLargeResultSet:
def test_should_process_one_million_row_result_set(self, execute_query, cursor):
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Same pattern here: execute_query is now only present to request a fixture but is not referenced. To avoid unused-argument lint errors while preserving fixture execution, rename it to _execute_query (or remove it if redundant with cursor).

Suggested change
def test_should_process_one_million_row_result_set(self, execute_query, cursor):
def test_should_process_one_million_row_result_set(self, _execute_query, cursor):

Copilot uses AI. Check for mistakes.
Comment on lines 170 to +172
def test_should_handle_null_values_in_parameter_binding(self, execute_query, cursor):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
cursor.execute("SELECT ?, ?, ?", (None, 42, None))
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

In this test (and a few others in this file), execute_query is no longer referenced after removing assert_connection_is_open. If unused-argument linting is enabled, prefer _execute_query to indicate an intentionally-unused fixture, or drop the argument if it’s not required for setup.

Copilot uses AI. Check for mistakes.
Comment on lines 632 to +637
def test_should_bind_decimal_value(self, execute_query, cursor):
"""Test that Decimal values are properly handled."""
from decimal import Decimal

# Given Snowflake client is logged in with pyformat paramstyle
assert_connection_is_open(execute_query)
pass
from decimal import Decimal
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Placing imports after the pass no-op step is awkward and may conflict with import-convention linting (and makes the step read strangely). Prefer moving these from decimal import Decimal / from snowflake.connector import ProgrammingError imports to the module level, or at minimum to the top of the function (immediately after the docstring) so the BDD step section stays focused on test setup/behavior.

Copilot uses AI. Check for mistakes.
Comment on lines 124 to +128
type_cast = f"::{string_type}(32)"
results = [execute_query(f"SELECT {sql_val}{type_cast}", single_row=True) for _, sql_val in CORNER_CASE_VALUES]

# Then the result should contain expected corner case string values
for expected_val, sql_val in CORNER_CASE_VALUES:
result = execute_query(f"SELECT {sql_val}{type_cast}", single_row=True)
for (expected_val, _), result in zip(CORNER_CASE_VALUES, results):
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

This change executes all corner-case queries up front and only then starts asserting. That makes failures harder to localize (you lose the exact SQL/value context at the point of failure) and prevents early exit on the first failing case. Consider keeping the query execution inside the assertion loop so each case is executed and asserted together.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Comment on lines 22 to 27
def test_should_bind_basic_types_with_positional_pyformat(self, execute_query, cursor):
"""Test basic type binding with %s placeholders."""

# Given Snowflake client is logged in with pyformat paramstyle
assert_connection_is_open(execute_query)
pass

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

execute_query is passed as a fixture argument but isn't used in this test (or the surrounding tests after removing assert_connection_is_open). Consider removing the unused execute_query parameter from these test signatures to reduce fixture noise and keep the tests focused on cursor behavior.

Copilot uses AI. Check for mistakes.
Comment on lines 25 to 30
def test_should_execute_simple_select_returning_single_value(self, execute_query, cursor):
"""Test simple SELECT returning single value."""

# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
pass

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

execute_query is included as a fixture argument but unused throughout these tests (they call cursor.execute directly). Consider removing the execute_query parameter from the affected test signatures in this module to avoid unnecessary fixture wiring and reduce confusion about which API is under test.

Copilot uses AI. Check for mistakes.
"SELECT ROW_NUMBER() OVER (ORDER BY seq8()) - 1 as id FROM TABLE(GENERATOR(ROWCOUNT => 1000000)) ORDER BY 1"
)

# Note: We use ROW_NUMBER() for actual query to ensure sequential integers.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment was to SQL above, plz revert moving it

def test_should_handle_null_values_in_parameter_binding(self, execute_query, cursor):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
cursor.execute("SELECT ?, ?, ?", (None, 42, None))
Copy link
Contributor

Choose a reason for hiding this comment

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

not reverted

Copy link
Contributor

Choose a reason for hiding this comment

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

whole file seems not reverted

def test_should_handle_null_values_in_parameter_binding(self, execute_query, cursor):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
cursor.execute("SELECT ?, ?, ?", (None, 42, None))
Copy link
Contributor

Choose a reason for hiding this comment

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

whole file seems not reverted

Comment on lines +158 to +159
# Note: seq8() doesn't guarantee consecutive values in parallel execution,
# so we use ROW_NUMBER() to ensure sequential integers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment for SQL moved to the wrong place

):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
columns = ", ".join(f"{v}::{float_type}" for v in select_values)
Copy link
Contributor

Choose a reason for hiding this comment

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

moved up instead of adding "pass"

Comment on lines +185 to +186
# Note: seq8() doesn't guarantee consecutive values in parallel execution,
# so we use ROW_NUMBER() to ensure sequential integers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Moved comment

):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
select_cols = ", ".join(f"{v}::{int_type}" for v in query_values)
Copy link
Contributor

Choose a reason for hiding this comment

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

moved up instead of adding "pass"

Comment on lines +178 to +179
# Note: seq8() doesn't guarantee consecutive values in parallel execution,
# so we use ROW_NUMBER() to ensure sequential integers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Moved comment

Comment on lines -205 to -206
# Note: seq8() doesn't guarantee consecutive values in parallel execution,
# so we use ROW_NUMBER() to ensure sequential integers.
Copy link
Contributor

Choose a reason for hiding this comment

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

moved comment

Comment on lines +125 to +126
results = [execute_query(f"SELECT {sql_val}{type_cast}", single_row=True) for _, sql_val in CORNER_CASE_VALUES]

Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary refactor

def test_should_select_timestamp_ltz_values(self, execute_query, values, query_values, expected_values):
# Given Snowflake client is logged in
assert_connection_is_open(execute_query)
select_cols = ", ".join(f"'{v}'::TIMESTAMP_LTZ" for v in query_values)
Copy link
Contributor

Choose a reason for hiding this comment

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

moved up instead of adding "pass"

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.

3 participants