You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2014/07/04 02:01:32 UTC
[2/8] git commit: [OPTIQ-326] Fix RelOptUtil ANY type check.
[OPTIQ-326] Fix RelOptUtil ANY type check.
Project: http://git-wip-us.apache.org/repos/asf/incubator-optiq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/b62097ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-optiq/tree/b62097ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-optiq/diff/b62097ed
Branch: refs/heads/master
Commit: b62097ede731504684fbb6c478206cdf4b1c7c46
Parents: ff40b4e
Author: vkorukanti <ve...@gmail.com>
Authored: Thu May 1 09:15:12 2014 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Thu Jul 3 12:21:28 2014 -0700
----------------------------------------------------------------------
core/src/main/java/org/eigenbase/relopt/RelOptUtil.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/b62097ed/core/src/main/java/org/eigenbase/relopt/RelOptUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/eigenbase/relopt/RelOptUtil.java b/core/src/main/java/org/eigenbase/relopt/RelOptUtil.java
index fc7e4b1..24ee23f 100644
--- a/core/src/main/java/org/eigenbase/relopt/RelOptUtil.java
+++ b/core/src/main/java/org/eigenbase/relopt/RelOptUtil.java
@@ -1458,6 +1458,13 @@ public abstract class RelOptUtil {
final String desc2,
RelDataType type2,
boolean fail) {
+
+ // if any one of the types is ANY return true
+ if (type1.getSqlTypeName() == SqlTypeName.ANY
+ || type2.getSqlTypeName() == SqlTypeName.ANY) {
+ return true;
+ }
+
if (type1 != type2) {
assert !fail : "type mismatch:\n"
+ desc1 + ":\n"