Skip to content
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

strings_as_dictionary fails if reading more than 1023 leading nulls #255

Open
batterseapower opened this issue Apr 15, 2020 · 0 comments
Open

Comments

@batterseapower
Copy link

This fails:

    with contextlib.closing(connect()) as conn, contextlib.closing(conn.cursor()) as cursor:
        sql = '\nunion all\n'.join((['select null ccy'] * 1024) + ["select 'CNY'"])
        cursor.execute(sql)
        print(cursor.fetchallarrow(strings_as_dictionary=True).to_pandas())

With an exception as follows:

  File "C:\Users\mboling\AppData\Local\Continuum\anaconda3\envs\py3\lib\site-packages\turbodbc\cursor.py", line 374, in fetchallarrow
    adaptive_integers).fetch_all()
turbodbc_intern.InterfaceError: Fetching Arrow result set failed.

If I change 1024 to 1023, set strings_as_dictionary=False, or move the select 'CNY' so it is the first item in the list, then turboodbc works as expected.

numpy==1.18.1
pandas==0.25.3
pyarrow==0.16.0
turbodbc==3.3.0
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

No branches or pull requests

1 participant