Skip to content

Minor: Use hasSameSizeAs to show more debug info#13701

Merged
nastra merged 1 commit into
apache:mainfrom
aihuaxu:test-use-hasSameSizeAs
Jul 30, 2025
Merged

Minor: Use hasSameSizeAs to show more debug info#13701
nastra merged 1 commit into
apache:mainfrom
aihuaxu:test-use-hasSameSizeAs

Conversation

@aihuaxu
Copy link
Copy Markdown
Contributor

@aihuaxu aihuaxu commented Jul 29, 2025

Revert back to use hasSameSizeAs instead of isEqualTo in the test since when the number doesn't match, hasSameSizeAs will show the records for debug.

Actual and expected should have same size but actual size is:
  100
while expected size is:
  99
Actual was:
  [[-1853403699951111791,keys: [djhnOE!Q8EcmpHvCXKdCGT1bKPynyUGZ57,MJtC!VHkgou8p!H1!10?RdQBc1e69Os-F
TMEx7tg6cF4Kvk2D3PcPGZUspTDtS9wK?p!qqERhkj?DT3A=CottFHuHPVAGRPlOwVpSWdNbP})]
...
	at org.apache.iceberg.spark.source.DataFrameWriteTestBase.createDataset(DataFrameWriteTestBase.java:104)
	at org.apache.iceberg.spark.source.DataFrameWriteTestBase.writeRecords(DataFrameWriteTestBase.java:69)
	at org.apache.iceberg.spark.source.ScanTestBase.writeAndValidate(ScanTestBase.java:105)
	at org.apache.iceberg.spark.source.ScanTestBase.writeAndValidate(ScanTestBase.java:85)
	at org.apache.iceberg.spark.data.AvroDataTestBase.testMap(AvroDataTestBase.java:277)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

@github-actions github-actions Bot added the spark label Jul 29, 2025
@aihuaxu
Copy link
Copy Markdown
Contributor Author

aihuaxu commented Jul 29, 2025

@nastra I'm changing back to use hasSameSizeAs. Please take a look.

@dramaticlly
Copy link
Copy Markdown
Contributor

nit, maybe can change title to "Spark 4.0: Use hasSameSizeAs in collection size assertion"

Copy link
Copy Markdown
Contributor

@nastra nastra left a comment

Choose a reason for hiding this comment

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

thanks for fixing this @aihuaxu

@nastra nastra merged commit ffeb7a2 into apache:main Jul 30, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants