You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by vl...@apache.org on 2020/07/17 18:58:37 UTC
[calcite] branch master updated (cdf8678 -> 9cafb57)
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.
from cdf8678 [CALCITE-4127] Remove final from AbstractRelNode#getRelTypeName
new 5462be9 Add a shortcut equalSansNullability in case the input types are the same
new 9cafb57 Remove excessive Arrays.asList from RexNormalize#hashCode
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
core/src/main/java/org/apache/calcite/rex/RexNormalize.java | 2 +-
core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
[calcite] 01/02: Add a shortcut equalSansNullability in case the
input types are the same
Posted by vl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
commit 5462be928849d6d2f24bfe7bb84edaa4397441c2
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Fri Jul 17 21:55:22 2020 +0300
Add a shortcut equalSansNullability in case the input types are the same
---
core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java
index bbad1ca..009ef8f 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java
@@ -1202,6 +1202,9 @@ public abstract class SqlTypeUtil {
* @return true if the types are equal or the only difference is nullability
*/
public static boolean equalSansNullability(RelDataType type1, RelDataType type2) {
+ if (type1 == type2) {
+ return true;
+ }
String x = type1.getFullTypeString();
String y = type2.getFullTypeString();
if (x.length() < y.length()) {
[calcite] 02/02: Remove excessive Arrays.asList from
RexNormalize#hashCode
Posted by vl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
commit 9cafb57c45b526776ed620ad2d5b5bb40f803b93
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Fri Jul 17 21:58:06 2020 +0300
Remove excessive Arrays.asList from RexNormalize#hashCode
---
core/src/main/java/org/apache/calcite/rex/RexNormalize.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/calcite/rex/RexNormalize.java b/core/src/main/java/org/apache/calcite/rex/RexNormalize.java
index fb7af07..bfdf9d7 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexNormalize.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexNormalize.java
@@ -127,7 +127,7 @@ public class RexNormalize {
if (x < 0) {
return Objects.hash(
SqlStdOperatorTable.reverse(operator),
- Arrays.asList(operands.get(1), operands.get(0)));
+ operands.get(1), operands.get(0));
}
if (isSymmetricalCall(operator, operands.get(0), operands.get(1))) {
return Objects.hash(operator, unorderedHash(operands));