fix(table): depth-limit nested sample values (salvage of #9383, credit @weiguangli-io)#10229
fix(table): depth-limit nested sample values (salvage of #9383, credit @weiguangli-io)#10229Bartok9 wants to merge 4 commits into
Conversation
Cap list/dict walking in get_sample_values before json.dumps so pathologically nested Polars/pandas struct samples cannot stall dataset registration. Salvage of marimo-team#9383 (credit @weiguangli-io). Closes marimo-team#9378. Co-authored-by: Weiguang Li <weiguangli-io@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I have read the CLA Document and I hereby sign the CLA |
for more information, see https://pre-commit.ci
str(value) at MAX_NESTING_DEPTH still walks large list/dict trees from branching payloads (marimo-team#9378). Emit "..." for containers instead, and add a branching fixture that asserts the sentinel + time bound. Addresses review on marimo-team#10229.
|
Thanks @Sanjays2402 — good catch. Pushed a follow-up: at Latest: e5bf854 |
for more information, see https://pre-commit.ci
|
I have read the CLA Document and I hereby sign the CLA |
|
This bug has already been fixed iirc, are there issues with that fix? |
|
You're right @Light2Dark — thanks for catching this. This overlaps with #9506, which already landed a fix for the nested-struct sample-value blow-up (via |
This pull request was authored by a coding agent.
salvage: depth-limit nested
get_sample_values(credit @weiguangli-io #9383)Original PR #9383 (credit @weiguangli-io) added a nesting depth cap so deeply nested Polars Struct columns could not stall dataset registration (#9378). That PR is CONFLICTING against current main:
to_primitivewas rewritten to usejson.dumpsfor list/dict values.This salvage
json.dumps, preserving Enum/int/float behaviortest_get_sample_values_nested_depth_limit(pandas nested dict depth 20 must finish <1s)Closes #9378
Supersedes / salvages #9383 (full credit to original author)
AI-assisted; human-reviewed. Human Co-authored-by retained for salvage credit.