Skip to content

Conversation

@jiuuon
Copy link
Contributor

@jiuuon jiuuon commented Dec 23, 2025

Why I'm doing:

When querying Iceberg metadata tables (history, snapshots, refs, etc.),
NPE occurs with message: "Cannot invoke Configuration.size() because conf is null".

This happens because:

  1. IcebergCachingFileIO.getWrappedIO() returns ResolvingFileIO without Configuration set
  2. When SerializableTable serializes the FileIO, it calls serializeConfWith()
  3. SerializableConfSupplier constructor calls conf.size() on null Configuration

What I'm doing:

Fix getWrappedIO() to propagate Configuration to wrappedIO before returning.

  • If conf is set via setConf(), use it
  • If conf is null (e.g., REST catalog), use default new Configuration()

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.0
    • 3.5
    • 3.4
    • 3.3

Note

Bugfix: propagate Hadoop Configuration to wrapped FileIO

  • Update IcebergCachingFileIO.getWrappedIO() to set wrappedIO's conf using existing conf or a default new Configuration() to avoid NPE during serializeConfWith
  • Add unit tests validating configuration propagation with and without prior setConf() in IcebergCachingFileIOTest

Written by Cursor Bugbot for commit 423804d. This will update automatically on new commits. Configure here.

@alvin-celerdata
Copy link
Contributor

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!

@jiuuon
Copy link
Contributor Author

jiuuon commented Dec 28, 2025

Hi @dirtysalt @Youngwb

Could you please review this PR when you have a chance?

All CI checks have passed with 100% coverage on the changed lines.

Thanks!

@alvin-celerdata
Copy link
Contributor

@mergify rebase

@mergify
Copy link
Contributor

mergify bot commented Dec 29, 2025

rebase

✅ Branch has been successfully rebased

@alvin-celerdata alvin-celerdata force-pushed the fix/iceberg-caching-fileio-conf-propagation branch from 464e980 to 423804d Compare December 29, 2025 00:03
@sonarqubecloud
Copy link

@github-actions
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

@github-actions
Copy link

[FE Incremental Coverage Report]

pass : 2 / 2 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/connector/iceberg/io/IcebergCachingFileIO.java 2 2 100.00% []

@github-actions
Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants