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


##########
arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowFieldType.java:
##########
@@ -17,84 +17,69 @@
 package org.apache.calcite.adapter.arrow;
 
 import org.apache.calcite.adapter.java.JavaTypeFactory;
-import org.apache.calcite.linq4j.tree.Primitive;
 import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.sql.type.SqlTypeName;
 
 import org.apache.arrow.vector.types.FloatingPointPrecision;
 import org.apache.arrow.vector.types.pojo.ArrowType;
 
-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);
-
-  private final Class<?> clazz;
-
-  ArrowFieldType(Primitive primitive) {
-    this(requireNonNull(primitive.boxClass, "boxClass"));
-  }
+public class ArrowFieldType {
 
-  ArrowFieldType(Class<?> clazz) {
-    this.clazz = clazz;
+  private ArrowFieldType() {

Review Comment:
   this looks like a factory, so the name of the class is probably not 
appropriate.



##########
arrow/src/test/java/org/apache/calcite/adapter/arrow/ArrowData.java:
##########
@@ -237,35 +239,38 @@ public void writeArrowDataType(File file) throws 
IOException {
       vectorSchemaRoot.setRowCount(numRows);
       for (Field field : vectorSchemaRoot.getSchema().getFields()) {
         FieldVector vector = vectorSchemaRoot.getVector(field.getName());
-        switch (vector.getMinorType()) {
-        case TINYINT:
+        switch (field.getName()) {

Review Comment:
   why change these?



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