Skip to content

Conversation

@ueshin
Copy link
Member

@ueshin ueshin commented Aug 8, 2018

What changes were proposed in this pull request?

We should use Block.isEmpty/nonEmpty instead of comparing with empty string to check whether the code is empty or not.

[error] [warn] /.../sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala:278: org.apache.spark.sql.catalyst.expressions.codegen.Block and String are unrelated: they will most likely always compare unequal
[error] [warn]       if (ev.code != "" && required.contains(attributes(i))) {
[error] [warn] 
[error] [warn] /.../sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastHashJoinExec.scala:323: org.apache.spark.sql.catalyst.expressions.codegen.Block and String are unrelated: they will most likely never compare equal
[error] [warn]          |  ${buildVars.filter(_.code == "").map(v => s"${v.isNull} = true;").mkString("\n")}
[error] [warn] 

How was this patch tested?

Existing tests.

@ueshin
Copy link
Member Author

ueshin commented Aug 8, 2018

cc @viirya @cloud-fan @gatorsmile

@kiszk
Copy link
Member

kiszk commented Aug 8, 2018

LGTM

1 similar comment
@viirya
Copy link
Member

viirya commented Aug 8, 2018

LGTM

@SparkQA
Copy link

SparkQA commented Aug 8, 2018

Test build #94437 has finished for PR 22041 at commit fa7e1b1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@ueshin
Copy link
Member Author

ueshin commented Aug 9, 2018

Thanks! merging to master.

@asfgit asfgit closed this in 519e03d Aug 9, 2018
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.

4 participants