codeant-ai-for-open-source[bot] commented on code in PR #39344:
URL: https://github.com/apache/superset/pull/39344#discussion_r3197093142
##########
superset/models/helpers.py:
##########
@@ -1881,10 +1881,26 @@ def join_offset_dfs(
time_grain
)
- if join_column_producer and not time_grain:
- raise QueryObjectValidationError(
- _("Time Grain must be specified when using Time Shift.")
+ if not time_grain:
+ has_temporal_join_key = any(
+ pd.api.types.is_datetime64_any_dtype(df[key])
+ for key in join_keys
+ if key in df.columns
)
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not flag `is_datetime64_any_dtype` in `join_offset_dfs`; temporal
columns are normalized to `datetime64` upstream, so this guard is sufficient as
a defense-in-depth check.
**Applied to:**
- `superset/models/helpers.py`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/settings/learnings)*
--
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]