You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "anandnalya (via GitHub)" <gi...@apache.org> on 2024/09/04 08:31:07 UTC
Re: [I] Data preview for iceberg partitioned tables(using trino) does not work. [superset]
anandnalya commented on issue #26449:
URL: https://github.com/apache/superset/issues/26449#issuecomment-2328242497
I was able to get this working with the following patch which disables partitioning support for Iceberg:
```
--- a/site-packages/superset/db_engine_specs/trino.py
--- b/site-packages/superset/db_engine_specs/trino.py
@@ -445,6 +445,13 @@
:returns: The indexes
"""
try:
- return super().get_indexes(database, inspector, table_name, schema)
+ indexes = super().get_indexes(database, inspector, table_name, schema)
+ # Handle iceberg tables. Even for non-partitioned tables, it returns a value
+ iceberg_cols_ignore = {"record_count", "file_count", "total_size", "data"}
+ if len(indexes) == 1 and indexes[0].get(
+ "name") == "partition" and iceberg_cols_ignore.issubset(
+ set(indexes[0].get("column_names", []))):
+ return []
+ return indexes
except NoSuchTableError:
return []
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org