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

Spark 3.5: Avoid deprecated method #11874

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ebyhr
Copy link
Contributor

@ebyhr ebyhr commented Dec 25, 2024

No description provided.

@github-actions github-actions bot added the spark label Dec 25, 2024
@@ -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);
Copy link
Contributor Author

@ebyhr ebyhr Dec 25, 2024

Choose a reason for hiding this comment

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

@@ -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])
Copy link
Contributor Author

@ebyhr ebyhr Dec 25, 2024

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())) {
Copy link
Contributor Author

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();
Copy link
Contributor Author

@ebyhr ebyhr Dec 25, 2024

Choose a reason for hiding this comment

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

@ebyhr
Copy link
Contributor Author

ebyhr commented Dec 25, 2024

CI hit #11651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant