john-bodley commented on code in PR #26131:
URL: https://github.com/apache/superset/pull/26131#discussion_r1409678137


##########
superset/db_engine_specs/presto.py:
##########
@@ -427,6 +427,7 @@ def _partition_query(  # pylint: 
disable=too-many-arguments,too-many-locals,unus
         limit: int = 0,
         order_by: list[tuple[str, bool]] | None = None,
         filters: dict[Any, Any] | None = None,
+        is_trino: bool = False,

Review Comment:
   If this is the route we want to take, ideally this should be not Trino 
specific, i.e., maybe something like `use_partition_suffix`. 



##########
superset/db_engine_specs/presto.py:
##########
@@ -467,7 +468,7 @@ def _partition_query(  # pylint: 
disable=too-many-arguments,too-many-locals,unus
             full_table_name = f"{schema}.{table_name}" if schema else 
table_name
             partition_select_clause = f"SHOW PARTITIONS FROM {full_table_name}"
         else:
-            system_table_name = f'"{table_name}$partitions"'
+            system_table_name = f'"{table_name}$partitions"' if not is_trino 
else table_name

Review Comment:
   @LittleWat note that Presto does support the `$partitions` table suffix per 
the [release 
notes](https://prestodb.io/docs/current/release/release-0.199.html).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to