Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support spark unbase64 function #425

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leoluan2009
Copy link
Contributor

Which issue does this PR close?

Closes #423 .

Rationale for this change

What changes are included in this PR?

How are these changes tested?

@@ -2073,6 +2073,13 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim
scalarExprToProtoWithReturnType(algorithm, StringType, childExpr)
}

case a: UnBase64 =>
val newExpr = unbase64Serde(a)
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a TODO for the unsupported failOnError?

Comment on lines +1483 to +1486
sql("create table t2(col string) using parquet")
sql("insert into t2 select base64(col) from t1")

checkSparkAnswerAndOperator("SELECT unbase64(col) FROM t2")
Copy link
Member

Choose a reason for hiding this comment

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

Why we need to insert base64(col) into t2 before comparing? Cannot we just check the results of select base64(col) from t1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support spark unbase64 function
2 participants