-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Spark 3.5: Avoid deprecated method #11874
base: main
Are you sure you want to change the base?
Conversation
@@ -251,7 +251,8 @@ private String getCompressionType(InputFile inputFile) throws Exception { | |||
return orcReader.getCompressionKind().name(); | |||
case PARQUET: | |||
ParquetMetadata footer = | |||
ParquetFileReader.readFooter(CONF, new Path(inputFile.location()), NO_FILTER); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readFooter
method is deprecated: https://javadoc.io/doc/org.apache.parquet/parquet-hadoop/latest/index.html
@@ -107,8 +107,8 @@ public void testAlterTable() throws NoSuchTableException { | |||
|
|||
assertThat(table).as("Should return updated table").isNotNull(); | |||
|
|||
StructField expectedField = DataTypes.createStructField(fieldName, DataTypes.StringType, true); | |||
assertThat(table.schema().fields()[2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
} finally { | ||
visitor.fieldNames.pop(); | ||
if (annotation.equals(LogicalTypeAnnotation.listType())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend reviewing this changer with "Hide whitespace" option.
I changed switch
to if
because LogicalTypeAnnotation
isn't enum.
@@ -59,106 +59,101 @@ public static <T> T visit(DataType sType, Type type, ParquetWithSparkSchemaVisit | |||
} else { | |||
// if not a primitive, the typeId must be a group | |||
GroupType group = type.asGroupType(); | |||
OriginalType annotation = group.getOriginalType(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OriginalType
enum is deprecated: https://www.javadoc.io/doc/org.apache.parquet/parquet-column/latest/org/apache/parquet/schema/OriginalType.html
CI hit #11651 |
No description provided.