Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-732] Support Struct complex type in Shuffle #733

Merged
merged 9 commits into from
Mar 1, 2022

Conversation

zhixingheyi-tian
Copy link
Collaborator

@zhixingheyi-tian zhixingheyi-tian commented Feb 9, 2022

What changes were proposed in this pull request?

  • Support nested Struct in shuffle

Let's focus on Struct support firstly. Because there are many points needed to modify for one new complex type.

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)

(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

#732

@zhouyuan
Copy link
Collaborator

@zhixingheyi-tian zhixingheyi-tian changed the title [NSE-732] Support Struct and Map nested types in Shuffle [NSE-732] Support Struct nested types in Shuffle Feb 22, 2022
@oap-project oap-project deleted a comment from zhixingheyi-tian Feb 23, 2022
case d: StructType =>
case _ =>
try {
ConverterUtils.createArrowField(attr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

disable nested array support here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@zhouyuan Done

@zhixingheyi-tian zhixingheyi-tian changed the title [NSE-732] Support Struct nested types in Shuffle [NSE-732] Support Struct Complex type in Shuffle Feb 23, 2022
@zhixingheyi-tian zhixingheyi-tian changed the title [NSE-732] Support Struct Complex type in Shuffle [NSE-732] Support Struct complex type in Shuffle Feb 23, 2022
@@ -517,6 +516,27 @@ object ConverterUtils extends Logging {
throw new UnsupportedOperationException(s"Unsupported data type: $dt")
}

def checkIfNestTypeSupported(dt: DataType): Unit = dt match {
case d: ArrayType => checkIfTypeSupported(d.elementType)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Array[Array[]] still supported?

Copy link
Collaborator Author

@zhixingheyi-tian zhixingheyi-tian Feb 28, 2022

Choose a reason for hiding this comment

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

@zhouyuan
checkIfTypeSupported is another check function, it has excluded the Array/Struct/Map support.

Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe rename this like checkPrimitiveTypes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

"checkIfTypeSupported" is reuse the existed func. It has been used in too many Operator scala files.

import io.netty.buffer.{ByteBuf, ByteBufAllocator, ByteBufOutputStream}
import java.nio.channels.{Channels, WritableByteChannel}

import com.google.common.collect.Lists
import java.io.{InputStream, OutputStream}
import java.util
Copy link
Collaborator

Choose a reason for hiding this comment

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

import java.util.ArrayList ?

@zhouyuan
Copy link
Collaborator

related: #461

@zhouyuan zhouyuan merged commit 7f59755 into oap-project:master Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants