mihaibudiu commented on code in PR #4052:
URL: https://github.com/apache/calcite/pull/4052#discussion_r1862657461


##########
arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowFieldType.java:
##########
@@ -25,27 +25,17 @@
 
 import java.math.BigDecimal;
 import java.sql.Date;
-import java.util.List;
 
 import static java.util.Objects.requireNonNull;
 
 /**
  * Arrow field type.
  */
-enum ArrowFieldType {
-  INT(Primitive.INT),
-  BOOLEAN(Primitive.BOOLEAN),
-  STRING(String.class),
-  FLOAT(Primitive.FLOAT),
-  DOUBLE(Primitive.DOUBLE),
-  DATE(Date.class),
-  LIST(List.class),
-  DECIMAL(BigDecimal.class),
-  LONG(Primitive.LONG),
-  BYTE(Primitive.BYTE),
-  SHORT(Primitive.SHORT);
+class ArrowFieldType {

Review Comment:
   Have you tried to apply the recommendations made in the output of the failed 
CI run?
   ```
   
/home/runner/work/calcite/calcite/core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:2654:
 Note: [MethodCanBeStatic] A private method that does not reference the 
enclosing instance can be static
       private void onMatch2(
       ^
       (see https://errorprone.info/bugpattern/MethodCanBeStatic)
     Did you mean 'private static void onMatch2('?
   
/home/runner/work/calcite/calcite/core/src/main/java/org/apache/calcite/util/format/postgresql/format/compiled/NumberCompiledPattern.java:82:
 Note: [MethodCanBeStatic] A private method that does not reference the 
enclosing instance can be static
     private String getOrdinalSuffix(String stringValue) {
     ^
       (see https://errorprone.info/bugpattern/MethodCanBeStatic)
     Did you mean 'private static String getOrdinalSuffix(String stringValue) 
{'?
   Note: Some input files use unchecked or unsafe operations.
   Note: Recompile with -Xlint:unchecked for details.
   
   > Task :arrow:compileJava
   
/home/runner/work/calcite/calcite/arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowTranslator.java:233:
 Note: [MethodCanBeStatic] A private method that does not reference the 
enclosing instance can be static
     private String translateUnaryOp(String op, String name) {
     ^
       (see https://errorprone.info/bugpattern/MethodCanBeStatic)
     Did you mean 'private static String translateUnaryOp(String op, String 
name) {'?
   
/home/runner/work/calcite/calcite/arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowFieldType.java:47:
 warning: [ImmutableEnumChecker] enums should be immutable: 'ArrowFieldType' 
has non-final field 'precision'
     private int precision;
                 ^
       (see https://errorprone.info/bugpattern/ImmutableEnumChecker)
     Did you mean 'private final int precision;'?
   
/home/runner/work/calcite/calcite/arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowFieldType.java:48:
 warning: [ImmutableEnumChecker] enums should be immutable: 'ArrowFieldType' 
has non-final field 'scale'
     private int scale;
                 ^
       (see https://errorprone.info/bugpattern/ImmutableEnumChecker)
     Did you mean 'private final int scale;'?
   ```



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to