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

[SPARK-45640][SQL][TESTS] Fix flaky ProtobufCatalystDataConversionSuite #43493

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class ProtobufCatalystDataConversionSuite
data != null &&
(data.get(0) == defaultValue ||
(dt.fields(0).dataType == BinaryType &&
data.get(0) != null &&
LuciferYang marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

@rangadi rangadi Oct 24, 2023

Choose a reason for hiding this comment

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

We should allow null value for the field. I.e. change this to:

  (data.get(0) == null || data.get(0).asInstanceOf[Array[Byte]].isEmpty)

I will test on my side to ensure this test stays stable with range of seed values.
cc: @HeartSaVioR

Copy link
Contributor

Choose a reason for hiding this comment

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

Ignore this suggestion. data.get(0) != null is correct. It allows testing null.

data.get(0).asInstanceOf[Array[Byte]].isEmpty)))
data = generator().asInstanceOf[Row]

Expand Down