-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(weave_query): Use correct types to prevent col header panel crash #3675
Conversation
WalkthroughThe changes introduce a new test case in the Arrow query tests to ensure that flattening an Arrow Weave List (AWL) with a union return type maintains its original object type. Additionally, the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant FlattenFunction
Caller->>FlattenFunction: call flatten(arr)
FlattenFunction->>FlattenFunction: set arr_was_flattened = False
FlattenFunction->>FlattenFunction: process array elements
alt Array is flattened
FlattenFunction->>FlattenFunction: set arr_was_flattened = True
end
alt arr_was_flattened True
FlattenFunction-->>Caller: return flattened type result
else
FlattenFunction-->>Caller: return original type result
end
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (762)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=8a64ae6cbf3d0704964e2316dfb63e08d51814a7 |
bba6d8a
to
d758dde
Compare
Description
Fixes WB-22999
Bug Description
When a user clicks on a table's column header where the column is a list of images, they experience a panel crash.
The root cause is a types mismatch between the pyarrow ListArray and the AWL's
object_type
because of different logic used to determine:If the array should be flattened, versus
weave/weave_query/weave_query/ops_arrow/list_ops.py
Lines 924 to 928 in 3be274d
The return object_type of the AWL
weave/weave_query/weave_query/ops_arrow/list_ops.py
Lines 903 to 912 in 3be274d
Solution
This PR sets the object_type of the returned AWL based on if the array was flattened or not.
Testing
How was this PR tested?
Local dev + added unit test
Before (my local dev can't load image artifacts for some reason):
img_list_before.mov
After:
listimg_after.mov
Summary by CodeRabbit
New Features
Tests