You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2023/01/10 11:04:01 UTC
[orc] branch main updated: ORC-1343: Disable ENABLE_INDEXES
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 a6a434211 ORC-1343: Disable ENABLE_INDEXES
a6a434211 is described below
commit a6a434211bb3ce54c5a22bfa7009ee360d871548
Author: deshanxiao <de...@microsoft.com>
AuthorDate: Tue Jan 10 03:03:50 2023 -0800
ORC-1343: Disable ENABLE_INDEXES
### What changes were proposed in this pull request?
This is a partial revert of ORC-1283.
### Why are the changes needed?
ORC reader assumes built-in indexes always so far.
### How was this patch tested?
N/A
Closes #1371 from dongjoon-hyun/ORC-1343.
Authored-by: deshanxiao <de...@microsoft.com>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
java/core/src/java/org/apache/orc/impl/WriterImpl.java | 3 ++-
java/core/src/test/org/apache/orc/impl/TestWriterImpl.java | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/java/core/src/java/org/apache/orc/impl/WriterImpl.java b/java/core/src/java/org/apache/orc/impl/WriterImpl.java
index e328d7793..264b01a3f 100644
--- a/java/core/src/java/org/apache/orc/impl/WriterImpl.java
+++ b/java/core/src/java/org/apache/orc/impl/WriterImpl.java
@@ -189,7 +189,8 @@ public class WriterImpl implements WriterInternal, MemoryManager.Callback {
this.rowIndexStride = 0;
}
- this.buildIndex = opts.isBuildIndex() && (rowIndexStride > 0);
+ // ORC-1343: We ignore `opts.isBuildIndex` due to the lack of reader support
+ this.buildIndex = rowIndexStride > 0;
if (buildIndex && rowIndexStride < MIN_ROW_INDEX_STRIDE) {
throw new IllegalArgumentException("Row stride must be at least " +
MIN_ROW_INDEX_STRIDE);
diff --git a/java/core/src/test/org/apache/orc/impl/TestWriterImpl.java b/java/core/src/test/org/apache/orc/impl/TestWriterImpl.java
index 84f4df808..679fb6cb8 100644
--- a/java/core/src/test/org/apache/orc/impl/TestWriterImpl.java
+++ b/java/core/src/test/org/apache/orc/impl/TestWriterImpl.java
@@ -32,6 +32,7 @@ import org.apache.orc.Writer;
import org.apache.orc.*;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.io.IOException;
@@ -93,6 +94,7 @@ public class TestWriterImpl {
w.close();
}
+ @Disabled("ORC-1343: Disable ENABLE_INDEXES tests until reader supports it properly")
@Test
public void testNoIndexIfEnableIndexIsFalse() throws Exception {
conf.set(OrcConf.OVERWRITE_OUTPUT_FILE.getAttribute(), "true");