codeant-ai-for-open-source[bot] commented on code in PR #42054:
URL: https://github.com/apache/superset/pull/42054#discussion_r3593004480
##########
superset/models/helpers.py:
##########
@@ -2369,31 +2483,13 @@ def join_offset_dfs(
time range instead of being truncated to the main series' range.
This
uses an outer join so offset-only rows (e.g. the rest of a prior
day when
the current day is still in progress) are preserved.
+ :param x_axis_label: The query's temporal x-axis label, used to pick
the
+ temporal join key when no time grain is set.
"""
join_column_producer =
app.config["TIME_GRAIN_JOIN_COLUMN_PRODUCERS"].get(
time_grain
)
-
- 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
- )
- if has_temporal_join_key:
- has_relative_offset = any(
- not (
- self.is_valid_date_range(offset)
- and feature_flag_manager.is_feature_enabled(
- "DATE_RANGE_TIMESHIFTS_ENABLED"
- )
- )
- for offset in offset_dfs
- )
- if has_relative_offset:
- raise QueryObjectValidationError(
- _("Time Grain must be specified when using Time
Comparison.")
- )
+ original_columns = list(df.columns)
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not flag tuple-unpacking assignments in Python for missing inline type
annotations when the types are already inferred from an annotated return value.
**Applied to:**
- `**/*.py`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/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]