You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ma...@apache.org on 2015/07/23 05:03:09 UTC
phoenix git commit: Bug fix in ExpressionFactory for RexLiteral
Repository: phoenix
Updated Branches:
refs/heads/calcite c28cc110d -> 216010dfd
Bug fix in ExpressionFactory for RexLiteral
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/216010df
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/216010df
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/216010df
Branch: refs/heads/calcite
Commit: 216010dfdd09e96e78104870e792cec0ae16fdfb
Parents: c28cc11
Author: maryannxue <we...@intel.com>
Authored: Wed Jul 22 23:02:55 2015 -0400
Committer: maryannxue <we...@intel.com>
Committed: Wed Jul 22 23:02:55 2015 -0400
----------------------------------------------------------------------
.../src/main/java/org/apache/phoenix/calcite/CalciteUtils.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/216010df/phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java b/phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java
index 99b8ba9..a28e395 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java
@@ -6,6 +6,7 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.calcite.avatica.util.ByteString;
import org.apache.calcite.rex.RexCall;
import org.apache.calcite.rex.RexInputRef;
import org.apache.calcite.rex.RexLiteral;
@@ -470,6 +471,8 @@ public class CalciteUtils {
Object o = lit.getValue();
if (o instanceof NlsString) {
o = ((NlsString) o).getValue();
+ } else if (o instanceof ByteString) {
+ o = ((ByteString) o).getBytes();
}
try {
return LiteralExpression.newConstant(o, targetType);