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

chore: rename props with dot separation #13656

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/connector/src/source/kafka/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ pub struct KafkaProperties {
#[serde(rename = "scan.startup.mode", alias = "kafka.scan.startup.mode")]
pub scan_startup_mode: Option<String>,

#[serde(rename = "scan.startup.timestamp_millis", alias = "kafka.time.offset")]
#[serde(
rename = "scan.startup.timestamp.millis",
alias = "kafka.time.offset",
alias = "scan.startup.timestamp_millis" // keep for compatibility
)]
pub time_offset: Option<String>,

#[serde(rename = "properties.group.id", alias = "kafka.consumer.group")]
Expand Down
5 changes: 4 additions & 1 deletion src/connector/src/source/nats/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ pub struct NatsProperties {
#[serde(rename = "scan.startup.mode")]
pub scan_startup_mode: Option<String>,

#[serde(rename = "scan.startup.timestamp_millis")]
#[serde(
rename = "scan.startup.timestamp.millis",
alias = "scan.startup.timestamp_millis"
)]
pub start_time: Option<String>,

#[serde(rename = "stream")]
Expand Down
6 changes: 5 additions & 1 deletion src/connector/src/source/pulsar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ pub struct PulsarProperties {
#[serde(rename = "scan.startup.mode", alias = "pulsar.scan.startup.mode")]
pub scan_startup_mode: Option<String>,

#[serde(rename = "scan.startup.timestamp_millis", alias = "pulsar.time.offset")]
#[serde(
rename = "scan.startup.timestamp.millis",
alias = "pulsar.time.offset",
alias = "scan.startup.timestamp_millis"
)]
pub time_offset: Option<String>,

#[serde(flatten)]
Expand Down
11 changes: 6 additions & 5 deletions src/connector/with_options_source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ KafkaProperties:
field_type: String
required: false
alias: kafka.scan.startup.mode
- name: scan.startup.timestamp_millis
- name: scan.startup.timestamp.millis
field_type: String
required: false
alias: kafka.time.offset
alias: scan.startup.timestamp_millis
- name: properties.group.id
field_type: String
required: false
Expand Down Expand Up @@ -219,9 +219,10 @@ NatsProperties:
- name: scan.startup.mode
field_type: String
required: false
- name: scan.startup.timestamp_millis
- name: scan.startup.timestamp.millis
field_type: String
required: false
alias: scan.startup.timestamp_millis
- name: stream
field_type: String
required: true
Expand Down Expand Up @@ -428,10 +429,10 @@ PulsarProperties:
field_type: String
required: false
alias: pulsar.scan.startup.mode
- name: scan.startup.timestamp_millis
- name: scan.startup.timestamp.millis
field_type: String
required: false
alias: pulsar.time.offset
alias: scan.startup.timestamp_millis
- name: topic
field_type: String
required: true
Expand Down
Loading