Skip to content

Conversation

@Mandukhai-Alimaa
Copy link
Contributor

What's Changed

Setup validation suite and override tests

Closes #6 .

7 tests are failing. Not sure how to handle them. @lidavidm can you take a look? Thanks

Copy link
Contributor

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

I locked my account...I'll test later

@lidavidm
Copy link
Contributor

lidavidm commented Dec 23, 2025

FAILED validation/tests/test_connection.py::TestConnection::test_get_objects_schema[snowflake:snowflake] - adbc_driver_manager.OperationalError: UNKNOWN: [Snowflake] 002043 (02000): SQL compilation error:
Object does not exist, or operation cannot be performed.
FAILED validation/tests/test_connection.py::TestConnection::test_get_objects_table[snowflake:snowflake] - adbc_driver_manager.OperationalError: UNKNOWN: [Snowflake] 002043 (02000): SQL compilation error:
Object does not exist, or operation cannot be performed.

#42 It seems one of the internal queries needs updating.

FAILED validation/tests/test_connection.py::TestConnection::test_get_objects_column[snowflake:snowflake] - AssertionError: assert [('MY_DATABASE', 'PUBLIC', 'getobjectstest', 'strs'), ('MY_DATABASE', 'PUBLIC', 'getobjectstest', 'ints')] == [('MY_DATABASE', 'PUBLIC', 'getobjectstest', 'ints'), ('MY_DATABASE', 'PUBLIC', 'getobjectstest', 'strs')]
  
  At index 0 diff: ('MY_DATABASE', 'PUBLIC', 'getobjectstest', 'strs') != ('MY_DATABASE', 'PUBLIC', 'getobjectstest', 'ints')
  
  Full diff:
    [
  +     (
  +         'MY_DATABASE',
  +         'PUBLIC',
  +         'getobjectstest',
  +         'strs',
  +     ),
        (
            'MY_DATABASE',
            'PUBLIC',
            'getobjectstest',
            'ints',
        ),
  -     (
  -         'MY_DATABASE',
  -         'PUBLIC',
  -         'getobjectstest',
  -         'strs',
  -     ),
    ]
FAILED validation/tests/test_connection.py::TestConnection::test_get_objects_column_xdbc[snowflake:snowflake] - AssertionError: assert {'catalog': 'MY_DATABASE', 'schema': 'PUBLIC', 'table': 'getobjectstest', 'column_name': 'strs', 'ordinal_position': 2} == {'catalog': 'MY_DATABASE', 'schema': 'PUBLIC', 'table': 'getobjectstest', 'column_name': 'ints', 'ordinal_position': 1}
  
  Common items:
  {'catalog': 'MY_DATABASE', 'schema': 'PUBLIC', 'table': 'getobjectstest'}
  Differing items:
  {'column_name': 'strs'} != {'column_name': 'ints'}
  {'ordinal_position': 2} != {'ordinal_position': 1}
  
  Full diff:
    {
        'catalog': 'MY_DATABASE',
  -     'column_name': 'ints',
  ?                     ^^
  +     'column_name': 'strs',
  ?                     ^ +
  -     'ordinal_position': 1,
  ?                         ^
  +     'ordinal_position': 2,
  ?                         ^
        'schema': 'PUBLIC',
        'table': 'getobjectstest',
    }

#43 I think we need to sort the result by ordinal_position.

FAILED validation/tests/test_ingest.py::TestIngest::test_create[snowflake:snowflake:ingest/timestamptz] - AssertionError: Field types do not match: value (timestamp[us, tz=UTC]) != value (timestamp[us, tz=America/Los_Angeles])
assert TimestampType(timestamp[us, tz=UTC]) == TimestampType(timestamp[us, tz=America/Los_Angeles])
 +  where TimestampType(timestamp[us, tz=UTC]) = pyarrow.Field<value: timestamp[us, tz=UTC]>.type
 +  and   TimestampType(timestamp[us, tz=America/Los_Angeles]) = pyarrow.Field<value: timestamp[us, tz=America/Los_Angeles]>.type

I think this is a known issue with how Snowflake treats timestamp types on ingest. We should just mark this as the "correct" answer for now.

FAILED validation/tests/test_query.py::TestQuery::test_query[snowflake:snowflake:type/bind/float64] - adbc_driver_manager.InternalError: INTERNAL: [Snowflake] 002086 (22000): SQL compilation error:
Invalid bind value (+Inf) for type (REAL).. Vendor code: 2086. SQLSTATE: 22000

I'm not sure where this is coming from. Maybe Snowflake sees very large doubles as Inf?

FAILED validation/tests/test_query.py::TestQuery::test_execute_schema[snowflake:snowflake:type/select/timestamp] - AssertionError: Field types do not match: res (timestamp[us]) != res (timestamp[us, tz=UTC])
assert TimestampType(timestamp[us]) == TimestampType(timestamp[us, tz=UTC])
 +  where TimestampType(timestamp[us]) = pyarrow.Field<res: timestamp[us]>.type
 +  and   TimestampType(timestamp[us, tz=UTC]) = pyarrow.Field<res: timestamp[us, tz=UTC]>.type

#44 I think this is a bug.

Copy link
Contributor

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Can you fix the float64 and ingest timestamp issues? For float64 maybe change the data being bound, for ingest timestamp just mark it as expected that the result type is different

@Mandukhai-Alimaa
Copy link
Contributor Author

Fixed the float64 and ingest timestamp issues and fixed the driver name too. For float64 binding, it dont seem to accept anything larger than 1.797693e+38.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these coming back as LA time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Snowflake is returning these in the session timezone. I set the session timezone to UTC and removed the LA time overrides.

@lidavidm lidavidm merged commit 5a8f0d2 into adbc-drivers:main Dec 29, 2025
12 of 13 checks passed
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.

[Go] Set up validation tests

2 participants