Steps to reproduce the behavior (Required)
- Install
starrocks Python package v1.3.3 (pip install starrocks)
- Connect Apache Superset (v4.1.2) to a StarRocks instance using the
starrocks SQLAlchemy dialect
- Create any table in StarRocks, e.g.:
CREATE TABLE test_db.example (
id INT,
dt DATE
) PARTITION BY RANGE(dt) (
PARTITION p1 VALUES LESS THAN ('2026-01-01')
)
DISTRIBUTED BY HASH(id) BUCKETS 4;
- In Superset, attempt to create a dataset pointing to that table
Expected behavior (Required)
The dataset should be created successfully and Superset should reflect the table schema.
Real behavior (Required)
Dataset creation fails with TypeError: unhashable type: 'ReflectedPartitionInfo'.
The root cause is in contrib/starrocks-python-client/starrocks/engine/interfaces.py. The dataclasses ReflectedPartitionInfo, ReflectedDistributionInfo, ReflectedTableKeyInfo, and ReflectedRefreshInfo do not define __hash__. Python dataclasses that define __eq__ (implicitly) become unhashable by default. These objects are stored in table_options and get passed into SQLAlchemy's reflection cache, which uses them as dictionary keys — causing the TypeError.
Full traceback:
File "sqlalchemy/engine/reflection.py", line 497, in get_columns
col_defs = self.dialect.get_columns(
File "<string>", line 2, in get_columns
File "sqlalchemy/engine/reflection.py", line 53, in cache
ret = info_cache.get(key)
TypeError: unhashable type: 'ReflectedPartitionInfo'
StarRocks version (Required)
- StarRocks server: 4.0 (via
starrocks/fe-ubuntu:4.0-latest Docker image)
starrocks Python package: 1.3.3
- Apache Superset: 4.1.2
- SQLAlchemy: 1.4.x / 2.x
Steps to reproduce the behavior (Required)
starrocksPython package v1.3.3 (pip install starrocks)starrocksSQLAlchemy dialectExpected behavior (Required)
The dataset should be created successfully and Superset should reflect the table schema.
Real behavior (Required)
Dataset creation fails with
TypeError: unhashable type: 'ReflectedPartitionInfo'.The root cause is in
contrib/starrocks-python-client/starrocks/engine/interfaces.py. The dataclassesReflectedPartitionInfo,ReflectedDistributionInfo,ReflectedTableKeyInfo, andReflectedRefreshInfodo not define__hash__. Python dataclasses that define__eq__(implicitly) become unhashable by default. These objects are stored intable_optionsand get passed into SQLAlchemy's reflection cache, which uses them as dictionary keys — causing theTypeError.Full traceback:
StarRocks version (Required)
starrocks/fe-ubuntu:4.0-latestDocker image)starrocksPython package: 1.3.3