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 2021/05/11 18:39:12 UTC

[orc] branch main updated: ORC-795: Add LineLength checkstyle rule (#697)

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 7cf229c  ORC-795: Add LineLength checkstyle rule (#697)
7cf229c is described below

commit 7cf229cf5d8c9b320d57586e0dba42945fe5cdff
Author: William Hyun <wi...@apache.org>
AuthorDate: Tue May 11 11:38:00 2021 -0700

    ORC-795: Add LineLength checkstyle rule (#697)
    
    ### What changes were proposed in this pull request?
    This PR aims to add the `LineLength` checkstyle rule.
    
    ### Why are the changes needed?
    There is no rule restricting line length, it would be great if we have this.
    
    ### How was this patch tested?
    Pass the CIs.
---
 java/core/src/java/org/apache/orc/impl/SerializationUtils.java | 3 ++-
 java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java  | 4 +++-
 java/core/src/java/org/threeten/extra/chrono/HybridDate.java   | 3 ++-
 java/pom.xml                                                   | 3 +++
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/java/core/src/java/org/apache/orc/impl/SerializationUtils.java b/java/core/src/java/org/apache/orc/impl/SerializationUtils.java
index dd40b31..522e20c 100644
--- a/java/core/src/java/org/apache/orc/impl/SerializationUtils.java
+++ b/java/core/src/java/org/apache/orc/impl/SerializationUtils.java
@@ -664,7 +664,8 @@ public final class SerializationUtils {
     unrolledBitPackBytes(input, offset, len, output, 8);
   }
 
-  private void unrolledBitPackBytes(long[] input, int offset, int len, OutputStream output, int numBytes) throws IOException {
+  private void unrolledBitPackBytes(long[] input, int offset, int len,
+      OutputStream output, int numBytes) throws IOException {
     final int numHops = 8;
     final int remainder = len % numHops;
     final int endOffset = offset + len;
diff --git a/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java b/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java
index bb1ff9a..ba9f456 100644
--- a/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java
+++ b/java/core/src/java/org/apache/orc/impl/TreeReaderFactory.java
@@ -2200,7 +2200,9 @@ public class TreeReaderFactory {
       readDictionaryByteArray(result, filterContext, batchSize);
     }
 
-    private void readDictionaryByteArray(BytesColumnVector result, FilterContext filterContext, int batchSize) throws IOException {
+    private void readDictionaryByteArray(BytesColumnVector result,
+                                         FilterContext filterContext,
+                                         int batchSize) throws IOException {
       int offset;
       int length;
 
diff --git a/java/core/src/java/org/threeten/extra/chrono/HybridDate.java b/java/core/src/java/org/threeten/extra/chrono/HybridDate.java
index c2f87c5..9670f5c 100644
--- a/java/core/src/java/org/threeten/extra/chrono/HybridDate.java
+++ b/java/core/src/java/org/threeten/extra/chrono/HybridDate.java
@@ -450,7 +450,8 @@ public final class HybridDate
 
     @Override
     public HybridDate minus(long amountToSubtract, TemporalUnit unit) {
-        return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amountToSubtract, unit));
+        return (amountToSubtract == Long.MIN_VALUE ?
+                plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amountToSubtract, unit));
     }
 
     //-------------------------------------------------------------------------
diff --git a/java/pom.xml b/java/pom.xml
index 6d89c1e..8a31b2f 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -279,6 +279,9 @@
                 </module>
                 <module name="NewlineAtEndOfFile">
                 </module>
+                <module name="LineLength">
+                  <property name="max" value="125"/>
+                </module>
                 <module name="RegexpSingleline">
                   <property name="format" value="\s+$"/>
                   <property name="message" value="No trailing white space allowed."/>