Skip to content

[SPARK-27494][SS] Null keys/values don't work in Kafka source v2 - #24441

Closed
uncleGen wants to merge 6 commits into
apache:masterfrom
uncleGen:SPARK-27494
Closed

[SPARK-27494][SS] Null keys/values don't work in Kafka source v2#24441
uncleGen wants to merge 6 commits into
apache:masterfrom
uncleGen:SPARK-27494

Conversation

@uncleGen

@uncleGenuncleGen commented Apr 23, 2019

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Right now Kafka source v2 doesn't support null keys or values.

  • When processing a null key, all of the following keys in the same partition will be null. This is a correctness bug.
  • When processing a null value, it will throw NPE.

How was this patch tested?

add new unit tests

@uncleGenuncleGen changed the title Null values don't work in Kafka source v2[SPARK-27494][SS] Null values don't work in Kafka source v2Apr 23, 2019
@SparkQA

Copy link
Copy Markdown

Test build #104829 has finished for PR 24441 at commit 5cb9502.

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

@uncleGen

Copy link
Copy Markdown
ContributorAuthor

pending on adding new unit test

@SparkQA

Copy link
Copy Markdown

Test build #104852 has finished for PR 24441 at commit 74bfb87.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

Copy link
Copy Markdown

Test build #104858 has finished for PR 24441 at commit aadad55.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@uncleGen

Copy link
Copy Markdown
ContributorAuthor

retest this please

@SparkQA

Copy link
Copy Markdown

Test build #104864 has finished for PR 24441 at commit aadad55.

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

@cloud-fan

Copy link
Copy Markdown
Contributor

good catch!

@SparkQA

Copy link
Copy Markdown

Test build #104885 has finished for PR 24441 at commit b6e9e31.

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

@SparkQA

Copy link
Copy Markdown

Test build #104886 has finished for PR 24441 at commit 2f30711.

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

@SparkQA

Copy link
Copy Markdown

Test build #104889 has finished for PR 24441 at commit 9dd38eb.

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

@SparkQA

Copy link
Copy Markdown

Test build #104891 has finished for PR 24441 at commit 45330de.

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

@SparkQA

Copy link
Copy Markdown

Test build #104893 has finished for PR 24441 at commit d91977d.

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

@dongjoon-hyun

Copy link
Copy Markdown
Member

Although SPARK-27494 is reported on only v2, can we have a test coverage for Kafka source v1 too?

@uncleGen

uncleGen commented Apr 25, 2019

Copy link
Copy Markdown
ContributorAuthor

@dongjoon-hyunmake sense, what about finishing it in a follow-up pr? v1 is already tested in KafkaMicroBatchV1SourceSuite

@cloud-fan

Copy link
Copy Markdown
Contributor

@dongjoon-hyun v1 is already tested because the test is in KafkaMicroBatchSourceSuiteBase

@uncleGenuncleGen reopened this Apr 25, 2019

@gaborgsomogyigaborgsomogyi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor things found, basically looks good.

@dongjoon-hyun

Copy link
Copy Markdown
Member

Got it. Thanks, @uncleGen and @cloud-fan !

@SparkQA

Copy link
Copy Markdown

Test build #104920 has finished for PR 24441 at commit d2ffea1.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

Copy link
Copy Markdown

Test build #104921 has finished for PR 24441 at commit 174321a.

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

@uncleGen

Copy link
Copy Markdown
ContributorAuthor

@cloud-fan Take a second glance please.

@zsxwingzsxwing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

cloud-fan pushed a commit that referenced this pull request Apr 26, 2019
## What changes were proposed in this pull request?
Right now Kafka source v2 doesn't support null values. The issue is in org.apache.spark.sql.kafka010.KafkaRecordToUnsafeRowConverter.toUnsafeRow which doesn't handle null values.
## How was this patch tested?
add new unit tests
Closes#24441 from uncleGen/SPARK-27494.
Authored-by: uncleGen <hustyugm@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit d2656aa)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@cloud-fan

Copy link
Copy Markdown
Contributor

thanks, merging to master/2.4!

@dongjoon-hyun

Copy link
Copy Markdown
Member

Thank you all!

@zsxwingzsxwing changed the title [SPARK-27494][SS] Null values don't work in Kafka source v2[SPARK-27494][SS] Null keys/values don't work in Kafka source v2Apr 26, 2019
kai-chi pushed a commit to kai-chi/spark that referenced this pull request Jul 23, 2019
## What changes were proposed in this pull request?
Right now Kafka source v2 doesn't support null values. The issue is in org.apache.spark.sql.kafka010.KafkaRecordToUnsafeRowConverter.toUnsafeRow which doesn't handle null values.
## How was this patch tested?
add new unit tests
Closesapache#24441 from uncleGen/SPARK-27494.
Authored-by: uncleGen <hustyugm@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit d2656aa)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
kai-chi pushed a commit to kai-chi/spark that referenced this pull request Jul 25, 2019
## What changes were proposed in this pull request?
Right now Kafka source v2 doesn't support null values. The issue is in org.apache.spark.sql.kafka010.KafkaRecordToUnsafeRowConverter.toUnsafeRow which doesn't handle null values.
## How was this patch tested?
add new unit tests
Closesapache#24441 from uncleGen/SPARK-27494.
Authored-by: uncleGen <hustyugm@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit d2656aa)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
kai-chi pushed a commit to kai-chi/spark that referenced this pull request Aug 1, 2019
## What changes were proposed in this pull request?
Right now Kafka source v2 doesn't support null values. The issue is in org.apache.spark.sql.kafka010.KafkaRecordToUnsafeRowConverter.toUnsafeRow which doesn't handle null values.
## How was this patch tested?
add new unit tests
Closesapache#24441 from uncleGen/SPARK-27494.
Authored-by: uncleGen <hustyugm@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit d2656aa)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for freeto 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.

7 participants

@uncleGen@SparkQA@cloud-fan@dongjoon-hyun@viirya@zsxwing@gaborgsomogyi