ihuzenko commented on a change in pull request #1899: DRILL-7445: Create batch
copier based on result set framework
URL: https://github.com/apache/drill/pull/1899#discussion_r347267693
##########
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.
Review comment:
This comment could be converted to javadoc for newly created
```isSameType(MajorType type1, MajorType type2)``` method.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services