Skip to content

Commit 3a7aa61

Browse files
varant-zlaiezvz
andauthored
Removing label part assertions that no longer apply (#676)
## Summary The job does not support multi-window and multiple labels ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Removed internal validation checks related to label join parts and aggregations, simplifying the label parts handling process. No changes to the user interface or exported functions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: ezvz <[email protected]>
1 parent fb08c34 commit 3a7aa61

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

api/python/ai/chronon/join.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -281,24 +281,6 @@ def LabelParts(
281281
)
282282
label_metadata = api.MetaData(executionInfo=exec_info)
283283

284-
for label in labels:
285-
if label.groupBy.aggregations is not None:
286-
assert len(labels) == 1, "Multiple label joinPart is not supported yet"
287-
valid_agg = (
288-
len(label.groupBy.aggregations) == 1
289-
and label.groupBy.aggregations[0].windows is not None
290-
and len(label.groupBy.aggregations[0].windows) == 1
291-
)
292-
assert valid_agg, (
293-
"Too many aggregations or invalid windows found. "
294-
"Single aggregation with one window allowed."
295-
)
296-
valid_time_unit = (
297-
label.groupBy.aggregations[0].windows[0].timeUnit
298-
== common.TimeUnit.DAYS
299-
)
300-
assert valid_time_unit, "Label aggregation window unit must be DAYS"
301-
302284
return api.LabelParts(
303285
labels=labels,
304286
metaData=label_metadata,

0 commit comments

Comments
 (0)