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

[NSE-705] Fallback R2C on unsupported cases #706

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

rui-mo
Copy link
Collaborator

@rui-mo rui-mo commented Jan 18, 2022

What changes were proposed in this pull request?

This pr added the fallback logic for R2C.
Fixed #705.

How was this patch tested?

locally verified

@github-actions
Copy link

#705

@rui-mo rui-mo requested a review from PHILO-HE January 18, 2022 06:08
@rui-mo
Copy link
Collaborator Author

rui-mo commented Jan 18, 2022

@PHILO-HE please take a review on this pr, thanks.

@zhouyuan
Copy link
Collaborator

@haojinIntel

@@ -65,7 +65,7 @@ class ArrowRowToColumnarExec(child: SparkPlan) extends RowToColumnarExec(child =
case d: BinaryType =>
case _ =>
throw new UnsupportedOperationException(s"${field.dataType} " +
s"is not supported in ArrowColumnarToRowExec.")
s"is not supported in ArrowRowToColumnarExec.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

@haojinIntel based on what i learned, r2c should support array type already?

@@ -65,7 +65,7 @@ class ArrowRowToColumnarExec(child: SparkPlan) extends RowToColumnarExec(child =
case d: BinaryType =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

We've supported ArrayType (not supported nested type) for ArrowRowToColumnarExec but not add it on "buildCheck". We can pass the unit tests by adding the code like following picture:

image

} catch {
case _: Throwable =>
logInfo("ArrowRowToColumnar: Falling back to RowToColumnar...")
RowToArrowColumnarExec(child)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@haojinIntel hi, I added ArrayType to buildCheck. But the fallback logics may be still needed to prevent throwing exception on other unsupported cases. Please take a review for that, thanks.

@zhouyuan zhouyuan merged commit ccb1e71 into oap-project:master Jan 18, 2022
@weiting-chen weiting-chen added the bug Something isn't working label Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two unit tests failed on master branch
4 participants