dongjoon-hyun commented on a change in pull request #635:
URL: https://github.com/apache/orc/pull/635#discussion_r566561275



##########
File path: java/core/src/java/org/apache/orc/impl/BufferChunk.java
##########
@@ -69,22 +69,8 @@ public final String toString() {
 
   @Override
   public DiskRange sliceAndShift(long offset, long end, long shiftBy) {
-    assert offset <= end && offset >= this.offset && end <= this.end;
-    assert offset + shiftBy >= 0;
-    ByteBuffer sliceBuf = chunk.slice();
-    int newPos = (int) (offset - this.offset);
-    int newLimit = newPos + (int) (end - offset);
-    try {
-      sliceBuf.position(newPos);
-      sliceBuf.limit(newLimit);
-    } catch (Throwable t) {
-      LOG.error("Failed to slice buffer chunk with range" + " [" + this.offset 
+ ", " + this.end
-          + "), position: " + chunk.position() + " limit: " + chunk.limit() + 
", "
-          + (chunk.isDirect() ? "direct" : "array") + "; to [" + offset + ", " 
+ end + ") "
-          + t.getClass());
-      throw new RuntimeException(t);
-    }
-    return new BufferChunk(sliceBuf, offset + shiftBy);
+    // Method has no code references
+    throw new UnsupportedOperationException();

Review comment:
       Of course, we should evaluate the removal PR first.
   For that PR, we need to validate with ORC/Iceberg/Hive at least.
   Although there exists many downstream, currently only the above three are 
compatible with ORC 1.6.x.
   We don't want to lose them again.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to