Skip to content

Commit

Permalink
[MINOR] Fixed unit tests in TestJavaHoodieBackedMetadata, and TestHoo…
Browse files Browse the repository at this point in the history
…dieDeltaStreamer.
  • Loading branch information
geserdugarov committed Dec 19, 2023
1 parent be2e95c commit 0bb3eae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import org.apache.hudi.common.testutils.HoodieTestTable;
import org.apache.hudi.common.testutils.HoodieTestUtils;
import org.apache.hudi.common.util.HoodieTimer;
import org.apache.hudi.common.util.JsonUtils;
import org.apache.hudi.common.util.Option;
import org.apache.hudi.common.util.collection.ClosableIterator;
import org.apache.hudi.common.util.collection.ExternalSpillableMap;
Expand Down Expand Up @@ -492,6 +493,9 @@ public void testTableOperationsWithMetadataIndex(HoodieTableType tableType) thro
.withMaxNumDeltaCommitsBeforeCompaction(12) // cannot restore to before the oldest compaction on MDT as there are no base files before that time
.build())
.build();
// module com.fasterxml.jackson.datatype:jackson-datatype-jsr310 is needed for proper column stats processing for Jackson >= 2.11 (Spark >= 3.3)
// Java 8 date/time type `java.time.LocalDate` is not supported by default
JsonUtils.registerModules();
init(tableType, writeConfig);
testTableOperationsForMetaIndexImpl(writeConfig);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@ public void testCsvDFSSourceNoHeaderWithoutSchemaProviderAndWithTransformer() th
testCsvDFSSource(false, '\t', false, Collections.singletonList(TripsWithDistanceTransformer.class.getName()));
}, "Should error out when doing the transformation.");
LOG.debug("Expected error during transformation", e);
assertTrue(e.getMessage().contains("cannot resolve 'begin_lat' given input columns:"));
assertTrue(e.getMessage().contains("Column 'begin_lat' does not exist. Did you mean one of the following?"));
}

@Test
Expand Down

0 comments on commit 0bb3eae

Please sign in to comment.