zhaoyongjie commented on a change in pull request #15279:
URL: https://github.com/apache/superset/pull/15279#discussion_r666336849
##########
File path: superset/common/query_context.py
##########
@@ -101,21 +104,143 @@ def __init__( # pylint: disable=too-many-arguments
"result_format": self.result_format,
}
- def get_query_result(self, query_object: QueryObject) -> Dict[str, Any]:
- """Returns a pandas dataframe based on the query object"""
+ @staticmethod
+ def left_join_on_dttm(
+ left_df: pd.DataFrame, right_df: pd.DataFrame
+ ) -> pd.DataFrame:
+ df = left_df.set_index(DTTM_ALIAS).join(right_df.set_index(DTTM_ALIAS))
+ df.reset_index(level=0, inplace=True)
+ return df
+
+ def processing_time_offsets(
Review comment:
I'm going to do a little refactoring for the return value(Returns an
object for this function). Thanks for the heads up.
--
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]