betodealmeida commented on code in PR #21002:
URL: https://github.com/apache/superset/pull/21002#discussion_r940767419


##########
superset/examples/bart_lines.py:
##########
@@ -34,7 +34,7 @@ def load_bart_lines(only_metadata: bool = False, force: bool 
= False) -> None:
     table_exists = database.has_table_by_name(tbl_name)
 
     if not only_metadata and (not table_exists or force):
-        content = get_example_data("bart-lines.json.gz")
+        content = get_example_data("bart-lines.json.gz", make_bytes=True)

Review Comment:
   Can you give some context on why `make_bytes` is needed here?
   
   Looking at [the 
docs](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_json.html)
 it seems that `read_json` still accepts a string. Passing `make_bytes=True` 
will wrap the string in a `BytesIO`, which seems unnecessary.



##########
superset/charts/post_processing.py:
##########
@@ -334,7 +334,7 @@ def apply_post_process(
         if query["result_format"] == ChartDataResultFormat.JSON:
             df = pd.DataFrame.from_dict(query["data"])
         elif query["result_format"] == ChartDataResultFormat.CSV:
-            df = pd.read_csv(StringIO(query["data"]))
+            df = pd.read_csv(StringIO(query["data"]), engine="pyarrow")

Review Comment:
   The docs mention that
   
   > New in version 1.4.0: The “pyarrow” engine was added as an experimental 
engine, and some features are unsupported, or may not work correctly, with this 
engine.
   
   So we should stick to the default to prevent any breaking changes. Any 
reason why you changed this to pyarrow, other than performance?



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