Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix #766) Deprecate AvroCompat, replace automatic schema detection on read + Configurable write #996

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
9 changes: 8 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ lazy val tools = project
"com.google.apis" % "google-api-services-bigquery" % bigqueryVersion,
"org.apache.avro" % "avro" % avroVersion % Provided,
"org.apache.parquet" % "parquet-hadoop" % parquetVersion,
"org.apache.hadoop" % "hadoop-common" % hadoopVersion,
Copy link
Contributor Author

@clairemcginty clairemcginty Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on the fence about relying so heavily on the hadoop Configuration class, since it pulls in hadoop-common artifact and links us more tightly with Hadoop. Parquet is trying to move away from Configuration and onto their own ParquetConfiguration class, which we could use instead. However, it might be confusing for Scio users since Scio is heavily dependent on Configuration and we don't have immediate plans to offboard from it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I might pull this out into a separate PR. will update shortly

"org.typelevel" %% "paiges-core" % paigesVersion
)
)
Expand All @@ -707,6 +708,7 @@ lazy val jmh: Project = project
cats % Test,
datastore % Test,
guava % Test,
parquet % Test,
protobuf % "test->test",
scalacheck % Test,
tensorflow % Test,
Expand All @@ -726,7 +728,12 @@ lazy val jmh: Project = project
"com.google.apis" % "google-api-services-bigquery" % bigqueryVersion % Test,
"com.google.cloud.datastore" % "datastore-v1-proto-client" % datastoreVersion % Test,
"org.apache.avro" % "avro" % avroVersion % Test,
"org.tensorflow" % "tensorflow-core-api" % tensorflowVersion % Test
"org.tensorflow" % "tensorflow-core-api" % tensorflowVersion % Test,
"org.apache.parquet" % "parquet-avro" % parquetVersion % Test,
"org.apache.parquet" % "parquet-column" % parquetVersion % Test,
"org.apache.parquet" % "parquet-hadoop" % parquetVersion % Test,
"org.apache.hadoop" % "hadoop-common" % hadoopVersion % Test,
"org.apache.hadoop" % "hadoop-mapreduce-client-core" % hadoopVersion % Test
)
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2024 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package magnolify.parquet

import org.apache.hadoop.conf.Configuration

/**
* Properties for reading and writing Magnolify ParquetType classes, configurable via a Hadoop
* [[Configuration]] instance.
*/
object MagnolifyParquetProperties {
val WriteGroupedArrays: String = "magnolify.parquet.write-grouped-arrays"
val WriteGroupedArraysDefault: Boolean = false

val WriteAvroSchemaToMetadata: String = "magnolify.parquet.write-avro-schema"
val WriteAvroSchemaToMetadataDefault: Boolean = true

val ReadTypeKey = "parquet.type.read.type"
val WriteTypeKey = "parquet.type.write.type"
}
Loading
Loading