-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[FLINK-25761] [docs] Translate Avro format page into Chinese. #18641
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 4b24b89 (Mon Feb 07 09:12:01 UTC 2022) 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. The 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 |
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.
@MrWhiteSike Thanks for the translation.
Could you review it by yourself based on the experience of your first PR before the next review ?
Looking forward to it.
@RocMarshal Thanks for the comment. I will review it based on the experience of My first PR! |
@RocMarshal Would you mind helping to review it again? Thx |
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.
@MrWhiteSike it looks very good on the whole. I left some minor comments. Please let me know what do you think of it.
|
||
```java | ||
usersDS.keyBy("name") | ||
``` | ||
|
||
|
||
Note that using the `GenericData.Record` type is possible with Flink, but not recommended. Since the record contains the full schema, its very data intensive and thus probably slow to use. | ||
注意,在 Flink 中可能会使用 `GenericData.Record` 类型,但是不推荐使用。由于该类型的记录中包含了完整的 schema,导致数据非常密集,使用起来可能很慢。 |
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.
可能会
->可以
由于
->因为
?
|
||
Flink's POJO field selection also works with POJOs generated from Avro. However, the usage is only possible if the field types are written correctly to the generated class. If a field is of type `Object` you can not use the field as a join or grouping key. | ||
Specifying a field in Avro like this `{"name": "type_double_test", "type": "double"},` works fine, however specifying it as a UNION-type with only one field (`{"name": "type_double_test", "type": ["double"]},`) will generate a field of type `Object`. Note that specifying nullable types (`{"name": "type_double_test", "type": ["null", "double"]},`) is possible! | ||
Flink 中在 Avro schema 生成的 POJO 类上也可以进行 POJO 字段选择。因此,只有在生成的类中正确写入字段类型时,才可以使用字段选择。如果一个字段类型是 `Object` 类型,你不可以选择该字段进行 join 或者 group by 操作。 |
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.
Flink 中在 Avro schema 生成的 POJO 类上也可以进行 POJO 字段选择。因此,只有在生成的类中正确写入字段类型时,才可以使用字段选择。如果一个字段类型是 `Object` 类型,你不可以选择该字段进行 join 或者 group by 操作。 | |
Flink 的 POJO 字段选择也适用于从 Avro schema 生成的 POJO 类。但是,只有将字段类型正确写入生成的类时,才能使用。如果字段是 `Object` 类型,则不能将该字段用作 join 键或 grouping 键。 |
Flink's POJO field selection also works with POJOs generated from Avro. However, the usage is only possible if the field types are written correctly to the generated class. If a field is of type `Object` you can not use the field as a join or grouping key. | ||
Specifying a field in Avro like this `{"name": "type_double_test", "type": "double"},` works fine, however specifying it as a UNION-type with only one field (`{"name": "type_double_test", "type": ["double"]},`) will generate a field of type `Object`. Note that specifying nullable types (`{"name": "type_double_test", "type": ["null", "double"]},`) is possible! | ||
Flink 中在 Avro schema 生成的 POJO 类上也可以进行 POJO 字段选择。因此,只有在生成的类中正确写入字段类型时,才可以使用字段选择。如果一个字段类型是 `Object` 类型,你不可以选择该字段进行 join 或者 group by 操作。 | ||
在 Avro 中类似 `{"name": "type_double_test", "type": "double"},` 这样指定字段是可行的,但是类似 (`{"name": "type_double_test", "type": ["double"]},`) 这样指定字段,字段类型就会生成为 `Object` 类型。注意,类似 (`{"name": "type_double_test", "type": ["null", "double"]},`) 这样指定 nullable 类型字段,也是有可能的! |
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.
在 Avro 中如 `{"name": "type_double_test", "type": "double"},` 这样指定字段是可行的,但是如 (`{"name": "type_double_test", "type": ["double"]},`) 这样指定包含一个字段的复合类型就会生成 `Object` 类型的字段。注意,如 (`{"name": "type_double_test", "type": ["null", "double"]},`) 这样指定 nullable 类型字段也是可能产生 `Object` 类型的!
@RocMarshal Thanks for the comments.I updated this pr based on your comments. Please review it again. Thanks |
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 update. LGTM +1(non-binding)
@wuchong Would you mind making the final check on it ? Thanks a lot.
What is the purpose of the change
Translate Avro format page into Chinese.
Brief change log
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation