Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ object Utils extends CometTypeShim {
name,
fieldType,
Seq(toArrowField("element", elementType, containsNull, timeZoneId)).asJava)
case StructType(fields) =>
case st @ StructType(fields) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

can we have a test case to avoid regression?

Copy link
Member Author

Choose a reason for hiding this comment

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

can we have a test case to avoid regression?

Sorry for the late reply, I just got back from the Chinese National Day holiday.

I will try to add a test case later.

if (st.names.toSet.size != fields.length) {
throw new SparkException(
"Duplicated field names in Arrow Struct are not allowed," +
s" got ${st.names.mkString("[", ", ", "]")}.")
}

val fieldType = new FieldType(nullable, ArrowType.Struct.INSTANCE, null)
new Field(
name,
Expand Down
Loading