bkyryliuk commented on a change in pull request #10498:
URL:
https://github.com/apache/incubator-superset/pull/10498#discussion_r466578324
##########
File path: superset/examples/birth_names.py
##########
@@ -54,19 +54,26 @@ def gen_filter(
def load_data(tbl_name: str, database: Database, sample: bool = False) -> None:
pdf = pd.read_json(get_example_data("birth_names.json.gz"))
- pdf.ds = pd.to_datetime(pdf.ds, unit="ms")
+ if database.backend == "presto":
+ pdf.ds = pd.to_datetime(pdf.ds, unit="ms")
+ pdf.ds = pdf.ds.dt.strftime("%Y-%m-%d %H:%M%:%S")
+ else:
+ pdf.ds = pd.to_datetime(pdf.ds, unit="ms")
Review comment:
my plan here is a bit different, we have talked about getting rid of
load_examples for the test, I plan to move initialization code into the pytest
fixture and will do that cleanup & restructure code to be more database generic.
The scope of the changes is test only, I prefer not to modify production
code.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]