Skip to content

Commit

Permalink
MINOR: [Java] Bump com.puppycrawl.tools:checkstyle from 8.29 to 10.17…
Browse files Browse the repository at this point in the history
….0 in /java (#43311)

### Rationale for this change

Now that Java 8 is deprecated, we can bump checkstyle to latest version.

### What changes are included in this PR?

* Bump checkstyle to 10.17.0
* Update checkstyle.xml to fix backwards-breaking changes
* Fix new check errors

### Are these changes tested?

CI

### Are there any user-facing changes?

No

Authored-by: Dane Pitkin <[email protected]>
Signed-off-by: Dane Pitkin <[email protected]>
  • Loading branch information
danepitkin committed Jul 30, 2024
1 parent f00a306 commit 48782e7
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 15 deletions.
1 change: 1 addition & 0 deletions java/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.gitattributes export-ignore
.gitignore export-ignore
* text=auto eol=lf
2 changes: 1 addition & 1 deletion java/dev/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ class Builder {
private final List<Field> newFields = new ArrayList<>();
private final Collection<Task> tasks = new ArrayList<>();

/**
* Constructor for the VectorSchemaRootTransformer's Builder.
*
* @param schema The Arrow schema.
* @param bufferAllocator The BufferAllocator to use for allocating memory.
*/
public Builder(final Schema schema, final BufferAllocator bufferAllocator) {
this.schema = schema;
this.bufferAllocator =
Expand Down Expand Up @@ -127,6 +133,11 @@ public Builder addEmptyField(final String fieldName, final ArrowType fieldType)
return this;
}

/**
* Build the {@link VectorSchemaRoot} with applied transformation tasks.
*
* @return The built {@link VectorSchemaRoot}.
*/
public VectorSchemaRootTransformer build() {
return (originalRoot, transformedRoot) -> {
if (transformedRoot == null) {
Expand Down
3 changes: 2 additions & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ under the License.
<dep.avro.version>1.11.3</dep.avro.version>
<arrow.vector.classifier></arrow.vector.classifier>
<forkCount>2</forkCount>
<checkstyle.version>10.17.0</checkstyle.version>
<checkstyle.failOnViolation>true</checkstyle.failOnViolation>
<error_prone_core.version>2.29.2</error_prone_core.version>
<mockito.core.version>5.11.0</mockito.core.version>
Expand Down Expand Up @@ -719,7 +720,7 @@ under the License.
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.29</version>
<version>${checkstyle.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@ public void reAlloc() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ public void clear() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Override
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ public void clear() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ public void clearDataBuffers() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ public List<ArrowBuf> getFieldBuffers() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ default void exportCDataBuffers(List<ArrowBuf> buffers, ArrowBuf buffersPtr, lon
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
List<BufferBacked> getFieldInnerVectors();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ public List<ArrowBuf> getFieldBuffers() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ protected void reallocOffsetBuffer() {
/**
* Get the offset vector.
*
* @return the underlying offset vector or null if none exists.
* @deprecated This API will be removed, as the current implementations no longer hold inner
* offset vectors.
* @return the underlying offset vector or null if none exists.
*/
@Override
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ private void setReaderAndWriterIndex() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
@Override
Expand Down Expand Up @@ -494,9 +494,9 @@ public void copyFrom(int inIndex, int outIndex, ValueVector from) {
/**
* Get the offset vector.
*
* @return the underlying offset vector or null if none exists.
* @deprecated This API will be removed, as the current implementations no longer hold inner
* offset vectors.
* @return the underlying offset vector or null if none exists.
*/
@Override
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ private void setReaderAndWriterIndex() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public interface RepeatedValueVector extends ValueVector, DensityAwareVector {
/**
* Get the offset vector.
*
* @return the underlying offset vector or null if none exists.
* @deprecated This API will be removed, as the current implementations no longer hold inner
* offset vectors.
* @return the underlying offset vector or null if none exists.
*/
@Deprecated
UInt4Vector getOffsetVector();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ private void setReaderAndWriterIndex() {
/**
* Get the inner vectors.
*
* @return the inner vectors for this field as defined by the TypeLayout
* @deprecated This API will be removed as the current implementations no longer support inner
* vectors.
* @return the inner vectors for this field as defined by the TypeLayout
*/
@Deprecated
@Override
Expand Down

0 comments on commit 48782e7

Please sign in to comment.