Skip to content

GH-38990: [Java] Upgrade to flatc version 23.5.26#38991

Merged
lidavidm merged 1 commit intoapache:mainfrom
danepitkin:danepitkin/java-flatbuf-upgrade
Nov 30, 2023
Merged

GH-38990: [Java] Upgrade to flatc version 23.5.26#38991
lidavidm merged 1 commit intoapache:mainfrom
danepitkin:danepitkin/java-flatbuf-upgrade

Conversation

@danepitkin
Copy link
Copy Markdown
Member

@danepitkin danepitkin commented Nov 29, 2023

Rationale for this change

Upgrade flatc version to match the C++ implementation.

What changes are included in this PR?

  • flatc upgraded to v23.5.26 and flatbuffer files regenerated

Are these changes tested?

Tested via CI/unit tests

Are there any user-facing changes?

Yes, but it's highly unlikely any user will use the flatbuffers directly.

@danepitkin danepitkin requested a review from lidavidm as a code owner November 29, 2023 22:00
@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #38990 has been automatically assigned in GitHub to PR creator.

Comment on lines -58 to -60
public static final String[] names = { "UNUSED", "DICTIONARY_REPLACEMENT", "COMPRESSED_BODY", };

public static String name(int e) { return names[e]; }
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the only change that looks like it could have downstream effects. Overall, I think it is benign if CI is successful.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, weird that it doesn't generate this anymore. We should probably be conservative and note the breaking change, even if I don't think anyone would have directly touched the flatbufs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This could be a bug in the Java flatbuffers implementation. It seems an enum of type Long was updated (hence the 0L updates), so maybe it is forgetting to add names now. I'll check out the upstream source.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've also filed google/flatbuffers#8179 in the meantime.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay, I verified that this is done by design for java flatbuffer generation (see issue above). Since Enum values actually reflect the long type when specified now, we can't create an array and try to index into it with a long value or we'll get a compiler error.

Copy link
Copy Markdown
Member Author

@danepitkin danepitkin Nov 30, 2023

Choose a reason for hiding this comment

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

Maybe we should make this Enum a short instead of a long here: https://github.com/apache/arrow/blob/main/format/Schema.fbs#L70

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can't change that without breaking other things.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's fair. I wouldn't want to modify the format itself for this tbh.

@github-actions github-actions Bot added awaiting committer review Awaiting committer review awaiting changes Awaiting changes and removed awaiting review Awaiting review awaiting committer review Awaiting committer review labels Nov 29, 2023
@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Nov 29, 2023
@danepitkin danepitkin added the Breaking Change Includes a breaking change to the API label Nov 30, 2023
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Nov 30, 2023
@lidavidm lidavidm merged commit d555890 into apache:main Nov 30, 2023
@lidavidm lidavidm removed the awaiting changes Awaiting changes label Nov 30, 2023
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit d555890.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 7 possible false positives for unstable benchmarks that are known to sometimes produce them.

dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
### Rationale for this change

Upgrade flatc version to match the C++ implementation.

### What changes are included in this PR?

* flatc upgraded to v23.5.26 and flatbuffer files regenerated

### Are these changes tested?

Tested via CI/unit tests

### Are there any user-facing changes?

Yes, but it's highly unlikely any user will use the flatbuffers directly.
* Closes: apache#38990

Authored-by: Dane Pitkin <dane@voltrondata.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
### Rationale for this change

Upgrade flatc version to match the C++ implementation.

### What changes are included in this PR?

* flatc upgraded to v23.5.26 and flatbuffer files regenerated

### Are these changes tested?

Tested via CI/unit tests

### Are there any user-facing changes?

Yes, but it's highly unlikely any user will use the flatbuffers directly.
* Closes: apache#38990

Authored-by: Dane Pitkin <dane@voltrondata.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
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.

[Java] Upgrade to flatc version 23.5.26

3 participants