Skip to content

Commit 2413ed5

Browse files
authored
Merge pull request #34090 from petrosagg/fix-avro-spec-link
update url of current avro spec
2 parents e969c1e + 78cd347 commit 2413ed5

File tree

8 files changed

+22
-24
lines changed

8 files changed

+22
-24
lines changed

doc/user/content/sql/create-sink/kafka.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ When using a Confluent Schema Registry:
184184
and the value to the registry.
185185

186186
* You can specify the
187-
[fullnames](https://avro.apache.org/docs/current/specification/#names) for the
187+
[fullnames](https://avro.apache.org/docs/++version++/specification/#names) for the
188188
Avro schemas Materialize generates using the `AVRO KEY FULLNAME` and `AVRO
189189
VALUE FULLNAME` [syntax](#syntax).
190190

doc/user/content/sql/create-source/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ The _latest_ schema is retrieved using the [`TopicNameStrategy`](https://docs.co
4343

4444
##### Schema evolution
4545

46-
As long as the writer schema changes in a [compatible way](https://avro.apache.org/docs/current/spec.html#Schema+Resolution), Materialize will continue using the original reader schema definition by mapping values from the new to the old schema version. To use the new version of the writer schema in Materialize, you need to **drop and recreate** the source.
46+
As long as the writer schema changes in a [compatible way](https://avro.apache.org/docs/++version++/specification/#schema-resolution), Materialize will continue using the original reader schema definition by mapping values from the new to the old schema version. To use the new version of the writer schema in Materialize, you need to **drop and recreate** the source.
4747

4848
##### Name collision
4949

5050
To avoid [case-sensitivity](/sql/identifiers/#case-sensitivity) conflicts with Materialize identifiers, we recommend double-quoting all field names when working with Avro-formatted sources.
5151

5252
##### Supported types
5353

54-
Materialize supports all [Avro types](https://avro.apache.org/docs/current/spec.html), _except for_ recursive types and union types in arrays.
54+
Materialize supports all [Avro types](https://avro.apache.org/docs/++version++/specification/), _except for_ recursive types and union types in arrays.
5555

5656
### JSON
5757

misc/python/materialize/data_ingest/data_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Backend(Enum):
3636

3737

3838
class DataType:
39-
"""As supported by Avro: https://avro.apache.org/docs/1.11.1/specification/_print/"""
39+
"""As supported by Avro: https://avro.apache.org/docs/++version++/specification/_print/"""
4040

4141
@staticmethod
4242
def random_value(

src/avro/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
//!
9797
//! For more information about schemas and what kind of information you can encapsulate in them,
9898
//! please refer to the appropriate section of the
99-
//! [Avro Specification](https://avro.apache.org/docs/current/spec.html#schemas).
99+
//! [Avro Specification](https://avro.apache.org/docs/++version++/specification/#schema-declaration).
100100
//!
101101
//! # Writing data
102102
//!
@@ -271,7 +271,7 @@
271271
//! The library will also automatically perform schema resolution while reading the data.
272272
//!
273273
//! For more information about schema compatibility and resolution, please refer to the
274-
//! [Avro Specification](https://avro.apache.org/docs/current/spec.html#schemas).
274+
//! [Avro Specification](https://avro.apache.org/docs/++version++/specification/#schema-declaration).
275275
//!
276276
//! There are two ways to handle deserializing Avro data in Rust, as you can see below.
277277
//!

src/avro/src/schema.rs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl std::error::Error for ParseSchemaError {}
112112

113113
/// Represents an Avro schema fingerprint
114114
/// More information about Avro schema fingerprints can be found in the
115-
/// [Avro Schema Fingerprint documentation](https://avro.apache.org/docs/current/spec.html#schema_fingerprints)
115+
/// [Avro Schema Resolution documentation](https://avro.apache.org/docs/++version++/specification/#schema-resolution)
116116
#[derive(Debug)]
117117
pub struct SchemaFingerprint {
118118
pub bytes: Vec<u8>,
@@ -186,11 +186,11 @@ pub enum SchemaPiece {
186186
Date,
187187
/// An `Int64` Avro schema with a semantic type being milliseconds since the unix epoch.
188188
///
189-
/// <https://avro.apache.org/docs/current/spec.html#Timestamp+%28millisecond+precision%29>
189+
/// <https://avro.apache.org/docs/++version++/specification/#time_ms>
190190
TimestampMilli,
191191
/// An `Int64` Avro schema with a semantic type being microseconds since the unix epoch.
192192
///
193-
/// <https://avro.apache.org/docs/current/spec.html#Timestamp+%28microsecond+precision%29>
193+
/// <https://avro.apache.org/docs/++version++/specification/#time-microsecond-precision>
194194
TimestampMicro,
195195
/// A `bytes` or `fixed` Avro schema with a logical type of `decimal` and
196196
/// the specified precision and scale.
@@ -350,7 +350,7 @@ impl SchemaPiece {
350350

351351
/// Represents any valid Avro schema
352352
/// More information about Avro schemas can be found in the
353-
/// [Avro Specification](https://avro.apache.org/docs/current/spec.html#schemas)
353+
/// [Avro Specification](https://avro.apache.org/docs/++version++/specification/#schema-declaration)
354354
#[derive(Clone, PartialEq)]
355355
pub struct Schema {
356356
pub(crate) named: Vec<NamedSchemaPiece>,
@@ -527,7 +527,7 @@ impl<'a> From<&'a Schema> for SchemaKind {
527527
/// `aliases` can also be defined, to facilitate schema evolution.
528528
///
529529
/// More information about schema names can be found in the
530-
/// [Avro specification](https://avro.apache.org/docs/current/spec.html#names)
530+
/// [Avro specification](https://avro.apache.org/docs/++version++/specification/#names)
531531
#[derive(Clone, Debug, PartialEq)]
532532
pub struct Name {
533533
pub name: String,
@@ -598,7 +598,7 @@ pub type Documentation = Option<String>;
598598
impl Name {
599599
/// Reports whether the given string is a valid Avro name.
600600
///
601-
/// See: <https://avro.apache.org/docs/1.11.1/specification/#names>
601+
/// See: <https://avro.apache.org/docs/++version++/specification/#names>
602602
pub fn is_valid(name: &str) -> bool {
603603
static MATCHER: LazyLock<Regex> =
604604
LazyLock::new(|| Regex::new(r"(^[A-Za-z_][A-Za-z0-9_]*)$").unwrap());
@@ -708,7 +708,7 @@ impl Name {
708708
/// Return the `fullname` of this `Name`
709709
///
710710
/// More information about fullnames can be found in the
711-
/// [Avro specification](https://avro.apache.org/docs/current/spec.html#names)
711+
/// [Avro specification](https://avro.apache.org/docs/++version++/specification/#names)
712712
pub fn fullname(&self, default_namespace: &str) -> FullName {
713713
FullName::from_parts(&self.name, self.namespace.as_deref(), default_namespace)
714714
}
@@ -1263,7 +1263,7 @@ impl SchemaParser {
12631263
/// avro ones are documented at [Avro][2].
12641264
///
12651265
/// [1]: https://debezium.io/docs/connectors/mysql/#temporal-values
1266-
/// [2]: https://avro.apache.org/docs/1.9.0/spec.html
1266+
/// [2]: https://avro.apache.org/docs/++version++/specification/
12671267
fn parse_long(complex: &Map<String, Value>) -> Result<SchemaPiece, AvroError> {
12681268
const AVRO_MILLI_TS: &str = "timestamp-millis";
12691269
const AVRO_MICRO_TS: &str = "timestamp-micros";
@@ -1380,18 +1380,16 @@ impl Schema {
13801380
/// Converts `self` into its [Parsing Canonical Form].
13811381
///
13821382
/// [Parsing Canonical Form]:
1383-
/// https://avro.apache.org/docs/1.8.2/spec.html#Parsing+Canonical+Form+for+Schemas
1383+
/// https://avro.apache.org/docs/++version++/specification#parsing-canonical-form-for-schemas
13841384
pub fn canonical_form(&self) -> String {
13851385
let json = serde_json::to_value(self).unwrap();
13861386
parsing_canonical_form(&json)
13871387
}
13881388

1389-
/// Generate [fingerprint] of Schema's [Parsing Canonical Form].
1389+
/// Generate fingerprint of Schema's [Parsing Canonical Form].
13901390
///
13911391
/// [Parsing Canonical Form]:
1392-
/// https://avro.apache.org/docs/1.8.2/spec.html#Parsing+Canonical+Form+for+Schemas
1393-
/// [fingerprint]:
1394-
/// https://avro.apache.org/docs/current/spec.html#schema_fingerprints
1392+
/// https://avro.apache.org/docs/++version++/specification#parsing-canonical-form-for-schemas
13951393
pub fn fingerprint<D: Digest>(&self) -> SchemaFingerprint {
13961394
let mut d = D::new();
13971395
d.update(self.canonical_form());
@@ -2153,7 +2151,7 @@ impl<'a> Serialize for RecordFieldSerContext<'a> {
21532151
}
21542152

21552153
/// Parses a **valid** avro schema into the Parsing Canonical Form.
2156-
/// <https://avro.apache.org/docs/1.8.2/spec.html#Parsing+Canonical+Form+for+Schemas>
2154+
/// <https://avro.apache.org/docs/++version++/specification#parsing-canonical-form-for-schemas>
21572155
fn parsing_canonical_form(schema: &serde_json::Value) -> String {
21582156
pcf(schema, "", false)
21592157
}

src/avro/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl From<Scalar> for Value {
9292

9393
/// Represents any valid Avro value
9494
/// More information about Avro values can be found in the
95-
/// [Avro Specification](https://avro.apache.org/docs/current/spec.html#schemas)
95+
/// [Avro Specification](https://avro.apache.org/docs/++version++/specification/#schema-declaration)
9696
#[derive(Clone, Debug, PartialEq)]
9797
pub enum Value {
9898
// Fixed-length types
@@ -353,7 +353,7 @@ impl ToAvro for JsonValue {
353353
impl Value {
354354
/// Validate the value against the given [Schema](../schema/enum.Schema.html).
355355
///
356-
/// See the [Avro specification](https://avro.apache.org/docs/current/spec.html)
356+
/// See the [Avro specification](https://avro.apache.org/docs/++version++/specification/)
357357
/// for the full set of rules of schema validation.
358358
pub fn validate(&self, schema: SchemaNode) -> bool {
359359
match (self, schema.inner) {

src/avro/tests/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static VALID_LOGICAL_TYPES: LazyLock<Vec<(&'static str, Value)>> = LazyLock::new
354354
]
355355
});
356356

357-
// From https://avro.apache.org/docs/current/spec.html#Logical+Types
357+
// From https://avro.apache.org/docs/++version++/specification/#logical-types
358358
// "Language implementations must ignore unknown logical types when reading, and should use the
359359
// underlying Avro type. If a logical type is invalid, for example a decimal with scale greater
360360
// than its precision, then implementations should ignore the logical type and use the underlying

src/interchange/src/avro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ mod tests {
7878
///
7979
/// Complete list of primitive types in test, also found in this
8080
/// documentation:
81-
/// https://avro.apache.org/docs/current/spec.html#schemas
81+
/// https://avro.apache.org/docs/++version++/specification/#primitive-types
8282
fn test_diff_pair_to_avro_primitive_types() -> anyhow::Result<()> {
8383
use numeric::Numeric;
8484
// Data to be used later in assertions.

0 commit comments

Comments
 (0)