This is an automated email from the ASF dual-hosted git repository. dongjoon pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push: new ddc0c297a ORC-1913: Fix `TestColumnStatistics` to set `testFilePath` with absolute path ddc0c297a is described below commit ddc0c297a9e5d724aa25af644a4636a56eb88708 Author: Dongjoon Hyun <dongj...@apache.org> AuthorDate: Mon Jun 9 17:01:52 2025 -0700 ORC-1913: Fix `TestColumnStatistics` to set `testFilePath` with absolute path ### What changes were proposed in this pull request? This PR aims to fix `TestColumnStatistics` to set `testFilePath` with absolute path. ### Why are the changes needed? The test case is fragile because it depends on the assumption that new FileSystem will be identical. For example, it fails when we set `fs.file.impl.disable.cache=false`. ``` $ git diff ... conf = new Configuration(); + conf.set("fs.file.impl.disable.cache", "true"); fs = FileSystem.getLocal(conf); $ mvn package --pl core -Dtest=TestColumnStatistics ... [ERROR] Errors: [ERROR] TestColumnStatistics.testDecimalMinMaxStatistics:695 ยป FileNotFound File TestOrcFile.testDecimalMinMaxStatistics.orc does not exist ``` ### How was this patch tested? Pass the CIs with the updated code. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #2261 from dongjoon-hyun/ORC-1913. Authored-by: Dongjoon Hyun <dongj...@apache.org> Signed-off-by: Dongjoon Hyun <dongj...@apache.org> --- java/core/src/test/org/apache/orc/TestColumnStatistics.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/core/src/test/org/apache/orc/TestColumnStatistics.java b/java/core/src/test/org/apache/orc/TestColumnStatistics.java index ddcbcdc1a..12dc152ed 100644 --- a/java/core/src/test/org/apache/orc/TestColumnStatistics.java +++ b/java/core/src/test/org/apache/orc/TestColumnStatistics.java @@ -753,9 +753,9 @@ public class TestColumnStatistics { @BeforeEach public void openFileSystem(TestInfo testInfo) throws Exception { conf = new Configuration(); + conf.set("fs.file.impl.disable.cache", "true"); fs = FileSystem.getLocal(conf); - fs.setWorkingDirectory(workDir); - testFilePath = new Path( + testFilePath = new Path(workDir + File.separator + "TestOrcFile." + testInfo.getTestMethod().get().getName() + ".orc"); fs.delete(testFilePath, false); }