Skip to content

Commit d9326c2

Browse files
wollowizardalfredo-scaccialepre-edosynenkaAmar3ttom-trieu
authored andcommitted
apache#34009 avro generic record to beam row conversion added support for a… (apache#34024)
* apache#34009 avro generic record to beam row conversion added support for all logical types and conversions * using string comparison to avoid class not found issues with earlier versions of avro * using string comparison to avoid class not found issues with earlier versions of avro * com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.9.1 * using string comparison to avoid class not found issues with earlier versions of avro * com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.9.1 * Add `types.Unalias` to types assertions and types switches to get an underlying type instead of types.Alias (apache#33868) * Revert huggingface transformers to 4.30.0 (apache#34025) * add endpoint type to WorkerMetadataResponse proto (apache#33953) * add endpoint type to WorkerMetadataResponse proto * add default value to endpoint_type * add hashcode/equals to WaitTest helper classes to avoid log error (apache#34006) * Add enable_lineage experiment to Dataflow tests (apache#34027) * Add UUID support in SpannerSchema (apache#34034) * Add UUID support in Spanner Schema * Add test * fix dashboard link (apache#34023) * [Go SDK] Add missing type inspection case for Alias types. (apache#34039) * removed unneeded license header * remove unneeded license header * Added tests for specific records generated with avro 1.8.2 and 1.9.2, and to add custom conversions * Supporting different UUID representations in different avro versions * Spotless fixes * fix dependency typo --------- Co-authored-by: Alfredo Scaccialepre <alfredo.scaccialepre@edreamsodigeo.com> Co-authored-by: synenka <97878236+synenka@users.noreply.github.com> Co-authored-by: Vitaly Terentyev <vitaly.terentyev@akvelon.com> Co-authored-by: martin trieu <martinkt@google.com> Co-authored-by: scwhittle <scwhittle@users.noreply.github.com> Co-authored-by: Yi Hu <yathu@google.com> Co-authored-by: Luv Agarwal <luvagarwal.k@gmail.com> Co-authored-by: Ahmed Abualsaud <65791736+ahmedabu98@users.noreply.github.com> Co-authored-by: Robert Burke <lostluck@users.noreply.github.com>
1 parent ee57aad commit d9326c2

File tree

6 files changed

+493
-40
lines changed

6 files changed

+493
-40
lines changed

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ tasks.rat {
4444

4545
"**/package-list",
4646
"**/test.avsc",
47+
"**/logical-types.avsc",
4748
"**/user.avsc",
4849
"**/test/resources/**/*.txt",
4950
"**/test/resources/**/*.csv",

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies {
4545
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14")
4646

4747
runtimeOnly("com.google.protobuf:protobuf-gradle-plugin:0.8.13") // Enable proto code generation
48-
runtimeOnly("com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.9.1") // Enable Avro code generation
48+
runtimeOnly("com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.9.1") // Enable Avro code generation. Version 1.1.0 is the last supporting avro 1.10.2
4949
runtimeOnly("com.diffplug.spotless:spotless-plugin-gradle:5.6.1") // Enable a code formatting plugin
5050
runtimeOnly("gradle.plugin.com.dorongold.plugins:task-tree:1.5") // Adds a 'taskTree' task to print task dependency tree
5151
runtimeOnly("gradle.plugin.com.github.johnrengelman:shadow:7.1.1") // Enable shading Java dependencies

sdks/java/extensions/avro/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ dependencies {
6767
implementation library.java.error_prone_annotations
6868
implementation library.java.avro
6969
implementation library.java.joda_time
70+
implementation library.java.commons_lang3
7071
testImplementation(project(path: ":sdks:java:core", configuration: "shadowTest")) {
7172
// Exclude Avro dependencies from "core" since Avro support moved to this extension
7273
exclude group: "org.apache.avro", module: "avro"
@@ -143,9 +144,11 @@ avroVersions.each { k, v ->
143144
main = "org.apache.avro.tool.Main"
144145
args = [
145146
"compile",
147+
"-bigDecimal", // Use BigDecimal for logical type decimal, similarly to what gradle-avro-plugin does
146148
"schema",
147149
"src/test/avro/org/apache/beam/sdk/extensions/avro/io/user.avsc",
148150
"src/test/avro/org/apache/beam/sdk/extensions/avro/schemas/test.avsc",
151+
"src/test/avro/org/apache/beam/sdk/extensions/avro/schemas/logicaltypes/logical-types.avsc",
149152
"build/generated/sources/avro$k/test/java"
150153
]
151154
}
@@ -161,4 +164,4 @@ static def createTaskNames(Map<String, String> prefixMap, String suffix) {
161164
return prefixMap.keySet().stream()
162165
.map { version -> "avroVersion${version}${suffix}" }
163166
.collect(Collectors.toList())
164-
}
167+
}

0 commit comments

Comments
 (0)