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

refactor(java): simpilfy fragment #3307

Merged
merged 18 commits into from
Jan 9, 2025
Merged

Conversation

chenkovsky
Copy link
Contributor

In PR #3240, python code is refactored, fragment is dataclass now. This PR refactors Java code, make the API consistent with python api.

@chenkovsky
Copy link
Contributor Author

BTW. current json verion is incompatible with newest spark. java.lang.NoSuchMethodError: 'java.util.Iterator org.json.JSONArray.iterator()'. this PR also solves this problem.

@eddyxu eddyxu requested review from wjones127 and LuQQiu and removed request for wjones127 January 3, 2025 23:12
Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

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

Nice working. Using the IntoJava and FromJObjectWithEnv traits seems like a good idea.

Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

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

Please increment the minor version as part of your PR. Then we can merge.


import java.io.Serializable;

public class DataFile implements Serializable {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we put these files into a sub package named fragment?


import java.io.Serializable;

public class DeletionFile implements Serializable {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the rust DeletionFile add some new filed, is this old DeletionFile also can be used?

@@ -8,7 +8,7 @@
<parent>
<groupId>com.lancedb</groupId>
<artifactId>lance-parent</artifactId>
<version>0.21.1</version>
<version>0.21.2</version>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The java version is the same with other langue. Shoud we bump java version here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted the change

@chenkovsky
Copy link
Contributor Author

Please increment the minor version as part of your PR. Then we can merge.

in check_versions.py, we need to bump version to 0.22. I don't know is this necessary?

@chenkovsky chenkovsky changed the title refactor(java)!: simpilfy fragment refactor(java): simpilfy fragment Jan 7, 2025
Copy link
Collaborator

@SaintBacchus SaintBacchus left a comment

Choose a reason for hiding this comment

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

LGTM

@eddyxu
Copy link
Contributor

eddyxu commented Jan 7, 2025

Thanks for the contribution, @chenkovsky . Once the conflicts are fixed, we can merge it.

@chenkovsky
Copy link
Contributor Author

Thanks for the contribution, @chenkovsky . Once the conflicts are fixed, we can merge it.

Ok. I have to revert the previous merged pr. 🤣

@eddyxu eddyxu merged commit 837ac24 into lancedb:main Jan 9, 2025
8 checks passed
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.

4 participants