-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-24291][table-planner]Decimal precision is lost when deserializing in test cases #17308
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
Conversation
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 2fcfaeb (Fri Sep 17 04:26:19 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
@flinkbot run azure |
godfreyhe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @xuyangzhong , LGTM overall
| .collect(Collectors.toList()); | ||
| RowTypeInfo rowType = (RowTypeInfo) schema.toRowType(); | ||
| List<TypeInformation> fieldTypeInfos = Arrays.asList(rowType.getFieldTypes()); | ||
| List<TypeInformation> csvSelectTypeInfos = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this field can be converted to array directly
| } | ||
|
|
||
| @Test | ||
| def testSelectDecimalWithPrecisionTenAndZeroFromFileSystem(): Unit={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"FromCsv" is more correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because now all test case is in Base, the specific subClass define the implements from avo, csv, json and etc.So if I follow the test behavior before, I think the name "FromFileSystem" is suit for this function. However, if I take this case to "FileSystemTestCsvITCase" or "StreamFileSystemTestCsvITCase", i need to rewrite the same test case twice time(and now subClass that contains these two class doesn't have any test cases at all).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense
3474817 to
c01a08e
Compare
|
@flinkbot run azure |
1 similar comment
|
@flinkbot run azure |
765eb79 to
32155a2
Compare
|
@flinkbot run azure |
32155a2 to
f82397b
Compare
|
@flinkbot run azure |
…erializing records from testcsv This closes apache#17308 (cherry picked from commit 4d69f7f)
…zing records from testcsv This closes apache#17308 (cherry picked from commit 4d69f7f)
…zing records from testcsv This closes apache#17308
What is the purpose of the change
Get the correct converter which is used to deserialize a decimal field by setting it the correct precision information.
Brief change log
It caused by the different code route between executing actual sql examples and testing test cases. So mainly change the code in TestRowDataCsvInputFormat.
Verifying this change
The test case added can verify this change.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation