Skip to content
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

chore: fix params with marshmallow schema for Datasets #23829

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions superset/datasets/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class DatasetColumnsPutSchema(Schema):
column_name = fields.String(required=True, validate=Length(1, 255))
type = fields.String(allow_none=True)
advanced_data_type = fields.String(allow_none=True, validate=Length(1, 255))
verbose_name = fields.String(allow_none=True, metadata={Length: (1, 1024)})
verbose_name = fields.String(allow_none=True, validate=Length(1, 1024))
description = fields.String(allow_none=True)
expression = fields.String(allow_none=True)
extra = fields.String(allow_none=True)
Expand All @@ -71,7 +71,7 @@ class DatasetMetricsPutSchema(Schema):
metric_name = fields.String(required=True, validate=Length(1, 255))
metric_type = fields.String(allow_none=True, validate=Length(1, 32))
d3format = fields.String(allow_none=True, validate=Length(1, 128))
verbose_name = fields.String(allow_none=True, metadata={Length: (1, 1024)})
verbose_name = fields.String(allow_none=True, validate=Length(1, 1024))
warning_text = fields.String(allow_none=True)
uuid = fields.UUID(allow_none=True)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/csv_upload_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,4 +556,4 @@ def test_import_parquet(mock_event_logger):

with test_db.get_sqla_engine_with_context() as engine:
data = engine.execute(f"SELECT * from {PARQUET_UPLOAD_TABLE}").fetchall()
assert data == [("max", 3), ("bob", 4), ("john", 1), ("paul", 2)]
assert data == [("john", 1), ("paul", 2), ("max", 3), ("bob", 4)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert data == [("john", 1), ("paul", 2), ("max", 3), ("bob", 4)]
assert sorted(data) == [('bob', 4), ('john', 1), ('max', 3), ('paul', 2)]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hughhhh you can revert this line as it's been addressed in #23856.

Loading