← All tasks
pythondatabricks/databricks-sqlalchemy #50Not a task: already works

Conversion of python UUIDs to strings is currently broken

envgap__databricks__databricks-sqlalchemy-50

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
99dc531a311548e99216170fef2b211ca05c95b9
Manifest
pyproject.toml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

databricks/databricks-sqlalchemy #50 · read the original issue
For whatever reason the library can't properly convert a python UUID to a string. I've had to manually cast any python UUID type variable to a string to get queries to work properly. What's happening is if you try something like the following

```
select(Users).where(Users.id == user_id)
```

where user_id is of type UUID (i.e. UUID('1daa91d7-8d35-4684-86d6-3fa89042c1f4')) it'll convert it to

```
SELECT * FROM users WHERE id = '1daa91d78d35468486d63fa89042c1f4'
```

in order to execute the right query, it needs to be done as

```
select(Users).where(Users.id == str(user_id))
```

in order to get

```
SELECT * FROM users WHERE id = '1daa91d7-8d35-4684-86d6-3fa89042c1f4'
```
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]