googleapis / googleapis/google-cloud-python

Array contains operation is not supported

未关闭
#15,680 1 条评论 0 个 reaction 已指派 1 人 已指派给 @olavloite 在 GitHub 查看
api: spanner
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

When creating an Array type column, the contains operation is not supported.

### To reproduce

```python
from sqlalchemy import ARRAY, String
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column

class Base(DeclarativeBase):
pass

class Sample(Base):
__tablename__ = "sample_table"
sample_field: Mapped[list[str]] = mapped_column(ARRAY(String(20)), nullable=False)

...

stmt = select(Sample).filter(Sample.sample_field.contains("test"))
```

### Error

```
NotImplementedError: ARRAY.contains() not implemented for the base ARRAY type; please use the dialect-specific ARRAY type
```

Going through the spanner dialect code, I could not find any array type I could import.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。