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

[Fix][MongoDB] The Long type cannot handle string values in scientific notation. #8775 #8783

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

qifanlili
Copy link

Purpose of this pull request

The purpose is to fix bug: 8775

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@qifanlili qifanlili changed the title [Fix][MongoDB] The Long type cannot handle string values in scientific notation. [Fix][MongoDB] The Long type cannot handle string values in scientific notation. #8775 Feb 21, 2025
Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

author lee <[email protected]> 1740121208 +0800
committer lee <[email protected]> 1741076125 +0800

parent a3a7b49
author lee <[email protected]> 1740121208 +0800
committer lee <[email protected]> 1741076105 +0800

[Fix][MongoDB] The Long type cannot handle string values in scientific notation. (apache#8783)
@github-actions github-actions bot added document core SeaTunnel core module and removed mongodb labels Mar 4, 2025
@qifanlili
Copy link
Author

@Hisoka-X Any other questions here?

Comment on lines +76 to +78
Method method = SamplingSplitStrategy.class.getDeclaredMethod("getDocumentNumAndAvgSize");
method.setAccessible(true);
ImmutablePair<Long, Long> result = (ImmutablePair<Long, Long>) method.invoke(strategy);
Copy link
Member

Choose a reason for hiding this comment

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

Try not to use reflection to test your code. Let's set getDocumentNumAndAvgSize scope to default and add @VisibleForTesting annotation. Then you can invoke it in here.

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