mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-25 08:58:26 +00:00
fix(ingest): tweak mongodb schema inference to fix test (#5744)
This commit is contained in:
parent
e448bb8832
commit
fa0fd7b830
@ -155,6 +155,9 @@ def construct_schema(
|
||||
# if single type detected, mark that as the type to go with
|
||||
if len(field_types.keys()) == 1:
|
||||
field_type = next(iter(field_types))
|
||||
elif set(field_types.keys()) == {int, float}:
|
||||
# If there's only floats and ints, it's not really a mixed type.
|
||||
field_type = float
|
||||
field_extended: SchemaDescription = {
|
||||
"types": schema[field_path]["types"],
|
||||
"count": schema[field_path]["count"],
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user