static WriterOptions createOrcWriterOptions(ObjectInspector sourceOi,
      Configuration conf, CacheWriter cacheWriter, int allocSize) throws IOException {
    return OrcFile.writerOptions(conf).stripeSize(Long.MAX_VALUE).blockSize(Long.MAX_VALUE)
        .rowIndexStride(Integer.MAX_VALUE) // For now, do not limit this - one RG per split
        .blockPadding(false).compress(CompressionKind.NONE).version(Version.CURRENT)
        .encodingStrategy(EncodingStrategy.SPEED).bloomFilterColumns(null).inspector(sourceOi)
        .physicalWriter(cacheWriter).memory(MEMORY_MANAGER).bufferSize(allocSize);
  }
This class only exists because Java doesn't have yield return. The original method
before this change only needed yield return-s sprinkled here and there; however,
Java developers are usually paid by class, so here we go.
llap-server/src/java/org/apache/hadoop/hive/llap/io/encoded/SerDeEncodedDataReader.java