dosubot[bot] commented on issue #33076: URL: https://github.com/apache/superset/issues/33076#issuecomment-2791815252
<!-- Greeting --> Привет, @vestrik! Я — бот, который может помочь вам решить баги, ответить на вопросы и стать участником проекта. Я здесь, чтобы помочь, пока вы ждете человека-администратора. <!-- Answer --> The issue you're experiencing with the SQL query for the hourly time grain in the master branch of Superset might be related to the way the time grain is being handled in the SQL query generation. In the master branch, the SQL expression for hourly time grains is defined as: ```python TimeGrain.HOUR: "date_trunc('hour', CAST({col} AS TIMESTAMP))" ``` This expression truncates the timestamp to the hour level by casting the column as a timestamp and applying the `date_trunc` function with 'hour' as the specified time grain <sup>[[1]](https://github.com/apache/superset/blob/master/superset/db_engine_specs/presto.py)</sup>. If the data is not grouped properly by hours, it could be due to differences in how the SQL expression is applied or interpreted by the database engine you are using. You might want to verify that the database engine supports the `date_trunc` function as expected and that the column data types are compatible with this operation. Additionally, ensure that the configuration and any custom time grain expressions are correctly set up in your Superset instance. If the issue persists, comparing the SQL query generated in the master branch with the one from version 4.1.1 might help identify specific differences that could be causing the problem. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d5842d2b-b13b-40c8-834f-0596527a9719?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d5842d2b-b13b-40c8-834f-0596527a9719?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d5842d2b-b13b-40c8-834f-0596527a9719?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d5842d2b-b13b-40c8-834f-0596527a9719?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d5842d2b-b13b-40c8-834f-0596527a9719?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/d5842d2b-b13b-40c8-834f-0596527a9719?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d5842d2b-b13b-40c8-834f-0596527a9719?feedback_type=other)</sup> -- 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-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org