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

ASF GitHub Bot commented on DRILL-7445:
---------------------------------------

ihuzenko commented on pull request #1899: DRILL-7445: Create batch copier based 
on result set framework
URL: https://github.com/apache/drill/pull/1899#discussion_r347265336
 
 

 ##########
 File path: common/src/main/java/org/apache/drill/common/types/Types.java
 ##########
 @@ -806,16 +806,20 @@ public static boolean isSortable(MinorType type) {
     return typeBuilder;
   }
 
+  public static boolean isSameType(MajorType type1, MajorType type2) {
+    return type1.getMinorType() == type2.getMinorType() &&
+           type1.getMode() == type2.getMode() &&
+           type1.getScale() == type2.getScale() &&
+           type1.getPrecision() == type2.getPrecision();
+  }
+
   public static boolean isEquivalent(MajorType type1, MajorType type2) {
 
     // Requires full type equality, including fields such as precision and 
scale.
     // But, unset fields are equivalent to 0. Can't use the protobuf-provided
     // isEquals() which treats set and unset fields as different.
 
-    if (type1.getMinorType() != type2.getMinorType() ||
-        type1.getMode() != type2.getMode() ||
-        type1.getScale() != type2.getScale() ||
-        type1.getPrecision() != type2.getPrecision()) {
+    if (! isSameType(type1, type2)) {
 
 Review comment:
   ```suggestion
       if (!isSameType(type1, type2)) {
   ```
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Create batch copier based on result set framework
> -------------------------------------------------
>
>                 Key: DRILL-7445
>                 URL: https://issues.apache.org/jira/browse/DRILL-7445
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.16.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Minor
>             Fix For: 1.17.0
>
>
> The result set framework now provides both a reader and writer. Provide a 
> copier that copies batches using this framework. Such a copier can:
> * Copy selected records
> * Copy all records, such as for an SV2 or SV4



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to