You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ze...@apache.org on 2025/03/25 16:09:00 UTC
(iceberg-go) branch main updated: fix: duckdb is strict on avro record names (#361)
This is an automated email from the ASF dual-hosted git repository.
zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git
The following commit(s) were added to refs/heads/main by this push:
new e9dfdba fix: duckdb is strict on avro record names (#361)
e9dfdba is described below
commit e9dfdba26111461fe3472102a2aa286b3b002c60
Author: Matt Topol <zo...@gmail.com>
AuthorDate: Tue Mar 25 12:08:55 2025 -0400
fix: duckdb is strict on avro record names (#361)
Turns out duckdb's iceberg extension gets really angry if the
`data_file`'s record name isn't `"r2"`...
---
internal/avro_schemas.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/internal/avro_schemas.go b/internal/avro_schemas.go
index 4fd4247..00fc01d 100644
--- a/internal/avro_schemas.go
+++ b/internal/avro_schemas.go
@@ -225,7 +225,7 @@ func init() {
WithFieldID(519))),
})))
- AvroSchemaCache.Add("data_file_v1", Must(avro.NewRecordSchema("data_file", "", []*avro.Field{
+ AvroSchemaCache.Add("data_file_v1", Must(avro.NewRecordSchema("r2", "", []*avro.Field{
Must(avro.NewField("file_path",
StringSchema,
avro.WithDoc("Location URI with FS scheme"),
@@ -286,7 +286,7 @@ func init() {
WithFieldID(140))),
})))
- AvroSchemaCache.Add("data_file_v2", Must(avro.NewRecordSchema("data_file", "", []*avro.Field{
+ AvroSchemaCache.Add("data_file_v2", Must(avro.NewRecordSchema("r2", "", []*avro.Field{
Must(avro.NewField("content", IntSchema,
avro.WithDoc("Content type"),
avro.WithDefault(0),
@@ -376,7 +376,7 @@ func newDataFileSchema(partitionType avro.Schema, version int) (avro.Schema, err
return nil, err
}
- return avro.NewRecordSchema("data_file", "",
+ return avro.NewRecordSchema("r2", "",
append(schema.(*avro.RecordSchema).Fields(), partField))
}