We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9bcea72 commit 775efc3Copy full SHA for 775efc3
fink_utils/spark/schema_converter.py
@@ -146,7 +146,12 @@ def _parse_struct(
146
else:
147
avroRecord["name"] = "topLevelRecord." + name
148
149
- avroRecord["name"] = "topLevelRecord"
+ if from_map:
150
+ avroRecord["name"] = "topLevelRecord"
151
+ else:
152
+ # FIXME: this might be unsafe if there are
153
+ # more than 1 map with no name...
154
+ avroRecord["name"] = "topLevelRecord.value"
155
if data["type"] not in ["struct"]:
156
raise ValueError("Expected ['struct'] type, is ", data["type"])
157
avroRecord["fields"] = []
0 commit comments