bito-code-review[bot] commented on PR #44156:
URL: https://github.com/apache/superset/pull/44156#issuecomment-5630102115

   <!-- Bito Reply -->
   The issue identified is correct. When a table contains only reserved 
partitions (like `__NULL__` or `__UNPARTITIONED__`), the current filter 
excludes them, causing `MAX(partition_id)` to return `NULL`. Subsequent code 
attempting to parse this result as a date will fail.
   
   To resolve this, you should check if the result is `None` before attempting 
to parse it. If it is `None`, the function should return `None` or an 
appropriate default, indicating no valid partitions exist.
   
   Regarding other comments on this PR: there are no other review comments in 
the provided context. If you have additional comments you would like me to 
review, please provide them.
   
   **superset/db_engine_specs/bigquery.py**
   ```
   # Compile to BigQuery SQL
           compiled_query = query.compile(
               dialect=database.get_dialect(), compile_kwargs={"literal_binds": 
True}
           )
           
           # Execute and check for None
           result = 
database.get_raw_connection().execute(compiled_query).fetchone()
           if result is None or result[0] is None:
               return None
           return result[0]
   ```


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