You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/02/23 13:58:37 UTC

[GitHub] [superset] yeachan153 commented on a change in pull request #18873: fix(sqllab/charts): casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp

yeachan153 commented on a change in pull request #18873:
URL: https://github.com/apache/superset/pull/18873#discussion_r812917892



##########
File path: superset/result_set.py
##########
@@ -174,7 +174,13 @@ def convert_pa_dtype(pa_dtype: pa.DataType) -> Optional[str]:
 
     @staticmethod
     def convert_table_to_df(table: pa.Table) -> pd.DataFrame:
-        return table.to_pandas(integer_object_nulls=True)
+        try:
+            return table.to_pandas(integer_object_nulls=True)
+        except pa.lib.ArrowInvalid:
+            return table.to_pandas(
+                integer_object_nulls=True,
+                timestamp_as_object=True

Review comment:
       It is true already by default:
   ![image](https://user-images.githubusercontent.com/30076090/155333731-63f00165-8097-4a0e-8518-cd00ea587aaf.png)
   




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