Skip to content

Commit

Permalink
ORC-1343: Disable ENABLE_INDEXES
Browse files Browse the repository at this point in the history
### 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 #1372 from dongjoon-hyun/ORC-1343-1.8.

Authored-by: deshanxiao <deshanxiao@microsoft.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
  • Loading branch information
deshanxiao authored and dongjoon-hyun committed Jan 10, 2023
1 parent 2608899 commit 30ae5af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/core/src/java/org/apache/orc/impl/WriterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ public WriterImpl(FileSystem fs,
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);
Expand Down
2 changes: 2 additions & 0 deletions java/core/src/test/org/apache/orc/impl/TestWriterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
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;
Expand Down Expand Up @@ -93,6 +94,7 @@ public void testNoBFIfNoIndex() throws Exception {
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");
Expand Down

0 comments on commit 30ae5af

Please sign in to comment.