pavibhai commented on a change in pull request #635:
URL: https://github.com/apache/orc/pull/635#discussion_r566067117



##########
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:
       If I don't do this, I need to handle this method call from the point of 
LazyIO.
   
   Given that this method is not used I was able to handle this by 
`UnsupportedOperationException`, if you prefer I can give a separate PR that 
should be merged in advance of this PR.




----------------------------------------------------------------
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