Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjinwu committed Jul 10, 2024
1 parent b67cf20 commit a4797fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions proto/catalog.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ message StreamSourceInfo {
// deprecated
plan_common.RowFormatType row_format = 1;
string row_schema_location = 2;
// This means *use **confluent** schema registry* and is `false` for **aws glue** schema registry.
// Eventually we will deprecate it and rely on `enum SchemaLocation` derived from `format_encode_options` below.
// * schema.location false
// * schema.registry true
// * aws.glue.schema_arn false
bool use_schema_registry = 3;
string proto_message_name = 4;
int32 csv_delimiter = 5;
Expand Down
5 changes: 5 additions & 0 deletions src/connector/src/parser/avro/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ impl AvroAccessBuilder {
}
}
WriterSchemaCache::Glue(resolver) => {
// <https://github.com/awslabs/aws-glue-schema-registry/blob/v1.1.20/common/src/main/java/com/amazonaws/services/schemaregistry/utils/AWSSchemaRegistryConstants.java#L59-L61>
// byte 0: header version = 3
// byte 1: compression: 0 = no compression; 5 = zlib (unsupported)
// byte 2..=17: 16-byte UUID as schema version id
// byte 18..: raw avro payload
if payload.len() < 18 {
bail!("payload shorter than 18-byte glue header");
}
Expand Down

0 comments on commit a4797fd

Please sign in to comment.