Skip to content

Commit 341b04a

Browse files
committed
fix code
Signed-off-by: xxchan <xxchan22f@gmail.com>
1 parent 71a0609 commit 341b04a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/connector/src/parser/avro/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl AvroAccessBuilder {
8787
/// ## Confluent schema registry
8888
///
8989
/// - In Kafka ([Confluent schema registry wire format](https://docs.confluent.io/platform/7.6/schema-registry/fundamentals/serdes-develop/index.html#wire-format)):
90-
/// starts with 5 bytes`0x00{schema_id:08x}` followed by Avro binary encoding.
90+
/// starts with 5 bytes`0x00{schema_id:08x}` followed by Avro binary encoding.
9191
async fn parse_avro_value(&self, payload: &[u8]) -> ConnectorResult<Option<Value>> {
9292
// parse payload to avro value
9393
// if use confluent schema, get writer schema from confluent schema registry

src/object_store/src/object/s3.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ impl S3StreamingUploader {
116116
/// Reference: <https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html>
117117
const MIN_PART_SIZE: usize = 5 * 1024 * 1024;
118118
const MAX_PART_SIZE: usize = 5 * 1024 * 1024 * 1024;
119-
let part_size = config
120-
.upload_part_size
121-
.min(MAX_PART_SIZE)
122-
.max(MIN_PART_SIZE);
119+
let part_size = config.upload_part_size.clamp(MIN_PART_SIZE, MAX_PART_SIZE);
123120

124121
Self {
125122
client,

0 commit comments

Comments
 (0)