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

feat(source): support ingesting Avro map type to RisingWave map type #17980

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Aug 8, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Part of #17743

Previously: (#16948) FORMAT ... ENCODE AVRO (map.handling.mode = 'jsonb') will convert Avro map type to RisingWave jsonb type. Other values of map.handling.mode, or unspecified will be rejected.

Now map.handling.mode = 'map' or unspecified will convert it to the native map type.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

As title and description

Copy link
Member Author

xxchan commented Aug 8, 2024

@xxchan xxchan changed the title support avro map feat(source): support ingesting Avro map type Aug 8, 2024
@xxchan xxchan marked this pull request as ready for review August 8, 2024 18:52
@xxchan xxchan mentioned this pull request Aug 8, 2024
19 tasks
@xxchan xxchan force-pushed the 08-09-feat_support_ingesting_avro_map_type branch 4 times, most recently from 2f8ad1f to a46e2cc Compare August 9, 2024 04:40
@xxchan xxchan changed the title feat(source): support ingesting Avro map type feat(source): support ingesting Avro map type to RisingWave map type Aug 9, 2024
@xxchan xxchan requested review from chenzl25 and xiangjinwu August 9, 2024 04:45
@xxchan xxchan mentioned this pull request Aug 9, 2024
9 tasks
@xxchan xxchan force-pushed the 07-26-feat_support_create_table_with_map_type branch from 519cd3d to 83e6410 Compare August 12, 2024 08:51
@xxchan xxchan force-pushed the 08-09-feat_support_ingesting_avro_map_type branch from a46e2cc to 775d975 Compare August 12, 2024 08:51
@xxchan xxchan force-pushed the 07-26-feat_support_create_table_with_map_type branch from 83e6410 to 34e9829 Compare August 13, 2024 04:01
@xxchan xxchan force-pushed the 08-09-feat_support_ingesting_avro_map_type branch 2 times, most recently from 56f9f43 to 49dca8a Compare August 13, 2024 06:12
Base automatically changed from 07-26-feat_support_create_table_with_map_type to main August 13, 2024 07:21
@chenzl25
Copy link
Contributor

@xxchan is it ready for review right now?

@xxchan xxchan force-pushed the 08-09-feat_support_ingesting_avro_map_type branch from 49dca8a to 62a7ea9 Compare August 13, 2024 09:33
@xxchan
Copy link
Member Author

xxchan commented Aug 13, 2024

@chenzl25 Yes, it's done. Just rebased

@xxchan xxchan force-pushed the 08-09-feat_support_ingesting_avro_map_type branch from 62a7ea9 to 5f1ab1a Compare August 13, 2024 09:34
@graphite-app graphite-app bot requested a review from a team August 13, 2024 09:51
Copy link
Contributor

@chenzl25 chenzl25 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@@ -318,6 +318,29 @@ impl<'a> AvroParseOptions<'a> {
(DataType::Varchar, Value::Uuid(uuid)) => {
uuid.as_hyphenated().to_string().into_boxed_str().into()
}
(DataType::Map(map_type), Value::Map(map)) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM. BTW do you know why we use apache-avro 0.16.0 instead of 0.17.0 here in this crate?

Copy link
Member Author

Choose a reason for hiding this comment

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

@xxchan xxchan enabled auto-merge August 14, 2024 01:39
@xxchan xxchan force-pushed the 08-09-feat_support_ingesting_avro_map_type branch from f22c883 to d3662a6 Compare August 14, 2024 01:57
@xxchan xxchan added this pull request to the merge queue Aug 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 14, 2024
@xxchan xxchan added this pull request to the merge queue Aug 14, 2024
Merged via the queue into main with commit ca4c98c Aug 14, 2024
30 of 31 checks passed
@xxchan xxchan deleted the 08-09-feat_support_ingesting_avro_map_type branch August 14, 2024 04:01
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