[ 
https://issues.apache.org/jira/browse/CALCITE-6292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17867996#comment-17867996
 ] 

Alessandro Solimando commented on CALCITE-6292:
-----------------------------------------------

My rule of thumb is, when it's not about the conceptual complexity but just the 
amount of (strictly related) changes, I generally opt for shaping the PR into 
separate commits (e.g., one per family type) so that they can be looked at 
independently and make the review process easier.

Several PRs are needed when you have too much complexity and/or conceptually 
separate issues, and generally you end up with separate Jira tickets, but as 
you mention, this one seems rather atomic already.

I don't think we generally go for multiple PRs for a single Jira ticket in 
Calcite, but I might be wrong.

> Support more Arrow types
> ------------------------
>
>                 Key: CALCITE-6292
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6292
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: arrow-adapter
>    Affects Versions: 1.37.0
>            Reporter: hongyu guo
>            Assignee: Caican Cai
>            Priority: Major
>
> All arrow type:
> {code:java}
> public static enum ArrowTypeID {
>     Null(Type.Null),
>     Struct(Type.Struct_),
>     List(Type.List),
>     LargeList(Type.LargeList),
>     FixedSizeList(Type.FixedSizeList),
>     Union(Type.Union),
>     Map(Type.Map),
>     Int(Type.Int),
>     FloatingPoint(Type.FloatingPoint),
>     Utf8(Type.Utf8),
>     LargeUtf8(Type.LargeUtf8),
>     Binary(Type.Binary),
>     LargeBinary(Type.LargeBinary),
>     FixedSizeBinary(Type.FixedSizeBinary),
>     Bool(Type.Bool),
>     Decimal(Type.Decimal),
>     Date(Type.Date),
>     Time(Type.Time),
>     Timestamp(Type.Timestamp),
>     Interval(Type.Interval),
>     Duration(Type.Duration),
>     NONE(Type.NONE);
> }
> {code}
> we support now:
> {code:java}
>   public static ArrowFieldType of(ArrowType arrowType) {
>     switch (arrowType.getTypeID()) {
>     case Int:
>       int bitWidth = ((ArrowType.Int) arrowType).getBitWidth();
>       switch (bitWidth) {
>       case 64:
>         return LONG;
>       case 32:
>         return INT;
>       case 16:
>         return SHORT;
>       case 8:
>         return BYTE;
>       default:
>         throw new IllegalArgumentException("Unsupported Int bit width: " + 
> bitWidth);
>       }
>     case Bool:
>       return BOOLEAN;
>     case Utf8:
>       return STRING;
>     case FloatingPoint:
>       FloatingPointPrecision precision = ((ArrowType.FloatingPoint) 
> arrowType).getPrecision();
>       switch (precision) {
>       case SINGLE:
>         return FLOAT;
>       case DOUBLE:
>         return DOUBLE;
>       default:
>         throw new IllegalArgumentException("Unsupported Floating point 
> precision: " + precision);
>       }
>     case Date:
>       return DATE;
>     case Decimal:
>       return DECIMAL;
>     default:
>       throw new IllegalArgumentException("Unsupported type: " + arrowType);
>     }
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to