kokhlo commented on code in PR #44156:
URL: https://github.com/apache/superset/pull/44156#discussion_r3989501533


##########
superset/db_engine_specs/bigquery.py:
##########
@@ -580,9 +580,13 @@ def get_max_partition_id(
         )
 
         # Build the query
-        query = select(
-            func.max(partitions_table.c.partition_id).label("max_partition_id")
-        ).where(partitions_table.c.table_name == table.table)
+        query = (
+            
select(func.max(partitions_table.c.partition_id).label("max_partition_id"))
+            .where(partitions_table.c.table_name == table.table)
+            .where(
+                partitions_table.c.partition_id.notin_(["__NULL__", 
"__UNPARTITIONED__"])
+            )
+        )

Review Comment:
   Valid point — when only reserved partitions exist, `MAX(partition_id)` now 
returns NULL and callers must omit the filter rather than build `PARSE_DATE` 
from it. Follow-up in the `where_latest_partition` NULL-handling is on my list; 
the immediate test-mock fix (`__enter__` protocol) is pushed in 30854bc.



-- 
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