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

Unknown type Date32 when inserting data into a Date32 field #79

Open
hramezani opened this issue Aug 2, 2023 · 1 comment
Open

Unknown type Date32 when inserting data into a Date32 field #79

hramezani opened this issue Aug 2, 2023 · 1 comment

Comments

@hramezani
Copy link

Getting asynch.errors.UnknownTypeError when inserting data into a Date32 field:

  File "lib/python3.11/site-packages/asynch/proto/columns/__init__.py", line 144, in get_column_by_spec
    raise UnknownTypeError("Unknown type {}".format(e.args[0]))
asynch.errors.UnknownTypeError: Code: 50. Unknown type Date32

Here is a minimal script to reproduce the bug:

import asyncio
from datetime import date

import asynch

async def main():
    pool = await asynch.create_pool(minsize=5)
    async with pool.acquire() as conn:
        async with conn.cursor() as cursor:
            await cursor.execute('CREATE DATABASE IF NOT EXISTS test')
            await cursor.execute('CREATE TABLE if not exists test.test (date Date32) ENGINE = MergeTree order by date')

            await cursor.execute('INSERT INTO test.test (date) VALUES', [{'date': date.today()}])

asyncio.run(main())
@3FANG
Copy link

3FANG commented Mar 19, 2024

020971f

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

2 participants