-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snowflake: adbc_ingest
will fail with "double free" segmentation fault if record batch schema is incorrect
#2108
Comments
@pkit Can you please share the package version(s) for which this issue occurred, and any other configuration you may have passed to the driver/connection? I failed to reproduce this using
|
I will add a full repro soon. Yes, it involves custom configuration for |
I lied, it fails even with no custom config. def test_adbc_bug(snowflake_connector_profile):
c = connect(snowflake_connector_profile.url, db_kwargs={
"adbc.snowflake.sql.schema": "PUBLIC",
"adbc.snowflake.sql.db": "TEST1",
})
schema = pa.schema(
fields=[
pa.field("name1", pa.string()),
pa.field("name2", pa.string()),
]
)
data = [
{"name1": "aaa"},
{"name1": "bbb"},
]
reader = pa.RecordBatchReader.from_batches(schema, [pa.RecordBatch.from_pylist(data)])
with c.cursor() as cur:
cur.adbc_ingest("test2", reader, mode="create_append") Exception:
|
What happened?
If schema of
RecordBatchReader
doesn't match the actual batch columns - adbc driver crashes.It's also pretty hard to debug why, because the only lead is "double free or corruption (out)".
Needed to run under valgrind to understand what's going on.
For some reason it fails in
go
with a proper exception "index out of bounds" but then it's not propagated to the python code.Stack Trace
No response
How can we reproduce the bug?
Environment/Setup
Latest
The text was updated successfully, but these errors were encountered: