EnxDev commented on code in PR #44997:
URL: https://github.com/apache/superset/pull/44997#discussion_r4210791018


##########
superset/semantic_layers/models.py:
##########
@@ -591,6 +592,33 @@ def columns(self) -> list[ColumnMetadata]:
     def column_names(self) -> list[str]:
         return [dimension.name for dimension in self._unique_dimensions]
 
+    @property
+    def main_dttm_col(self) -> str | None:

Review Comment:
   Once a view declares `metric_time`, this also turns on the filter 
granularity inference in `query_context_factory.py:268`. That's the dashboard 
native time range case the description lists as not yet verified live.
   
   Could we add a test that runs `_apply_granularity` against a semantic view 
declaring `metric_time` and checks that `granularity` lands on it? Right now 
the coverage only goes through the payload and `_resolve_time_column`.



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