Skip to content

Conversation

@geruh
Copy link
Contributor

@geruh geruh commented Jun 3, 2025

Which issue does this PR close?

Related to #6226.

Rationale for this change

This PR adds support for opendal::options::StatOptions conversion in the java bindings. This is part of the migration to the new options API outlined in RFC-6213 (#6213).

What changes are included in this PR?

  • Added a complete mapping and conversion of opendal::options::StatOptions
  • behavior tests mirroring Rust's async_stat.rs test suite
  • Added the capabilities to support the options
  • Instant to date time conversion which will aid in adding the read options.

Are there any user-facing changes?

Yes, users can now add options to their stat requests

@geruh geruh requested a review from tisonkun as a code owner June 3, 2025 05:59
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Jun 3, 2025
@geruh
Copy link
Contributor Author

geruh commented Jun 3, 2025

While working on this, I noticed that some of the options are specific to presign. I think I can add those in a follow-up, as this PR was getting large.

However, it's worth noting that the current presign API doesn't follow the new xxx_option pattern and instead uses the with_ method chaining approach. Also, presign operations support the override* fields and a small subset of options (e.g., if_none_match). It may be worth investigating adding support for the options defined in #6213 to the presign operations.

@Xuanwo
Copy link
Member

Xuanwo commented Jun 3, 2025

However, it's worth noting that the current presign API doesn't follow the new xxx_option pattern and instead uses the with_ method chaining approach. Also, presign operations support the override* fields and a small subset of options (e.g., if_none_match). It may be worth investigating adding support for the options defined in #6213 to the presign operations.

Nice catch! I haven’t implemented that for presign yet, as it’s a bit more complex. Feel free to take it on if you’re interested!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 4, 2025
@tisonkun
Copy link
Member

tisonkun commented Jun 4, 2025

Thanks for your contribution!

@tisonkun tisonkun merged commit a612f32 into apache:main Jun 4, 2025
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants