Dave Hirschfeld

Results 437 comments of Dave Hirschfeld

Bump! I would like to upgrade to the latest version but am stuck on 3.0.1 because of this pin 😔

> Does 3.0.1 work with latest pandas? That would be an interesting data point. I've been using 3.0.1 in combination with `pandas` 2.2.2 with no issues: ``` ❯ pip list...

It seems like it doesn't like assigning a None into an integer array: ```python > /opt/python/envs/dev310/lib/python3.10/site-packages/pandas/core/internals/managers.py(1703)as_array() 1701 pass 1702 else: -> 1703 arr[isna(arr)] = na_value 1704 1705 return arr.transpose() ipdb>...

The problematic function: https://github.com/databricks/databricks-sql-python/blob/a6e9b11131871de8b673e3072c5b64498df68217/src/databricks/sql/client.py#L1130-L1166

I can work around the issue by disabling pandas: ```python with engine.connect() as conn: cursor = conn.connection.cursor() cursor.connection.disable_pandas = True res = cursor.execute("select 1").fetchall() ``` ```python >>> res [Row(1=1)] ```...

Probably casting to object before assigning a `None` value is the right fix.

I'm not a maintainer here so I couldn't say. I was hoping to do some more testing at some point, but haven't found the time.

Thanks to [this](https://community.databricks.com/t5/data-engineering/using-current-timestamp-as-a-default-value-in-a-delta-table/td-p/11530) thread I ws able to find out the magic syntax: ```sql CREATE TABLE test.`ModelMetadata` ( pkid BIGINT GENERATED ALWAYS AS IDENTITY, name STRING NOT NULL, version STRING...

With `sa.func.now()` `sqlalchemy` emits the below SQL: ```sql CREATE TABLE test.`ModelMetadata` ( pkid BIGINT GENERATED ALWAYS AS IDENTITY, name STRING NOT NULL, version STRING NOT NULL, insert_timestamp TIMESTAMP DEFAULT now()...

> If that is required for defaults then I guess this projects needs to implement a custom compiler to add the required `TBLPROPERTIES`? Or, even better, just enable `allowColumnDefaults` by...