DRILL-2448: Enable standard implicit cast between Varchar and Varbinary rather than outdated special case in softEquals.
This is necessary to allow the interpreted expression system to evaluate these functions in the same manner as the code-generation based expression evaluation system does today. Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/a49b99ff Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/a49b99ff Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/a49b99ff Branch: refs/heads/master Commit: a49b99ff1a679a0dfb696686d62449edbb231f37 Parents: 8d70709 Author: Jason Altekruse <[email protected]> Authored: Thu Mar 12 16:42:24 2015 -0700 Committer: Jason Altekruse <[email protected]> Committed: Mon Apr 6 08:13:26 2015 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/drill/common/types/Types.java | 8 -------- 1 file changed, 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/a49b99ff/common/src/main/java/org/apache/drill/common/types/Types.java ---------------------------------------------------------------------- diff --git a/common/src/main/java/org/apache/drill/common/types/Types.java b/common/src/main/java/org/apache/drill/common/types/Types.java index f29f1ec..015ee90 100644 --- a/common/src/main/java/org/apache/drill/common/types/Types.java +++ b/common/src/main/java/org/apache/drill/common/types/Types.java @@ -263,15 +263,7 @@ public class Types { public static boolean softEquals(MajorType a, MajorType b, boolean allowNullSwap) { if (a.getMinorType() != b.getMinorType()) { - if ( - (a.getMinorType() == MinorType.VARBINARY && b.getMinorType() == MinorType.VARCHAR) || - (b.getMinorType() == MinorType.VARBINARY && a.getMinorType() == MinorType.VARCHAR) - ) { - // fall through; - } else { return false; - } - } if(allowNullSwap) { switch (a.getMode()) {
