-
Notifications
You must be signed in to change notification settings - Fork 795
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: Handle Date32 columns in Arrow tables and Polars DataFrames #3377
Changes from 7 commits
afd8caa
49536d4
9c6454d
f225b55
1432353
d843a1a
7feefd5
c119d1e
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 |
---|---|---|
|
@@ -56,7 +56,7 @@ def _dataset_name(values: Union[dict, list, core.InlineDataset]) -> str: | |
values = values.to_dict() | ||
if values == [{}]: | ||
return "empty" | ||
values_json = json.dumps(values, sort_keys=True) | ||
values_json = json.dumps(values, sort_keys=True, default=str) | ||
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. For computing the values hash, I think it's fine to fallback to string representation for types not supported by |
||
hsh = hashlib.sha256(values_json.encode()).hexdigest()[:32] | ||
return "data-" + hsh | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,7 +241,7 @@ def check_pre_transformed_vega_spec(vega_spec): | |
|
||
# Check that the bin transform has been applied | ||
row0 = data_0["values"][0] | ||
assert row0 == {"a": "A", "b": 28, "b_end": 28.0, "b_start": 0.0} | ||
assert row0 == {"a": "A", "b_end": 28.0, "b_start": 0.0} | ||
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. VegaFusion 1.6.6 strips out the "description" encoding field (which isn't used in the canvas renderer), so it's able to do a better job dropping unused columns. |
||
|
||
# And no transforms remain | ||
assert len(data_0.get("transform", [])) == 0 | ||
|
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.
It is a joy to read this type of code diff. Really nice approach!