-
Notifications
You must be signed in to change notification settings - Fork 3
[DRAFT] User collections: integer range #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 12 commits
499c000
c192a6e
77f63d1
721eecc
4a53e01
d0ce87f
3c5ed66
8893d79
a7469d3
9e66de2
025b556
29e1e74
dc3c686
a626dc1
8491cc6
6315f3d
d4230e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ | |
HybridPartition, | ||
HybridPartitionChild, | ||
HybridRoot, | ||
HybridUserGeneratedCollection, | ||
) | ||
|
||
|
||
|
@@ -676,6 +677,9 @@ def always_exists(self) -> bool: | |
# Stepping into a partition child always has a matching data | ||
# record for each parent, by definition. | ||
pass | ||
case HybridUserGeneratedCollection(): | ||
# User-generated collections are always guaranteed to exist. | ||
pass | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No they aren't (what if the range is empty?) This is why we need the always exists field for the generated colleciton. |
||
case _: | ||
raise NotImplementedError( | ||
f"Invalid start of pipeline: {start_operation.__class__.__name__}" | ||
|
@@ -726,6 +730,11 @@ def is_singular(self) -> bool: | |
case HybridChildPullUp(): | ||
if not self.children[self.pipeline[0].child_idx].subtree.is_singular(): | ||
return False | ||
# HA TODO: confirm is that right? | ||
case HybridUserGeneratedCollection(): | ||
# User-generated collections are always guaranteed to be | ||
# singular. | ||
pass | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely not. It is only singular if we can guarantee it has <=1 rows. |
||
case _: | ||
return False | ||
# The current level is fine, so check any levels above it next. | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name doesn't matter here, let's stringify using
self.user_collection.to_string()