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/12/16 21:46:24 UTC

incubator-calcite git commit: Shim to aid migration of ByteString to a new package

Repository: incubator-calcite
Updated Branches:
  refs/heads/master fede7e568 -> eeaadb589


Shim to aid migration of ByteString to a new package


Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/eeaadb58
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/eeaadb58
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/eeaadb58

Branch: refs/heads/master
Commit: eeaadb5897661cf4cf1e3a10fcd2dddce4397edb
Parents: fede7e5
Author: Julian Hyde <jh...@apache.org>
Authored: Tue Dec 16 12:01:54 2014 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Tue Dec 16 12:16:14 2014 -0800

----------------------------------------------------------------------
 core/src/main/java/org/apache/calcite/rex/RexLiteral.java | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/eeaadb58/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rex/RexLiteral.java b/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
index 5e879a1..09b869e 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
@@ -25,6 +25,7 @@ import org.apache.calcite.sql.SqlOperator;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.calcite.sql.parser.SqlParserUtil;
 import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.util.Bug;
 import org.apache.calcite.util.ConversionUtil;
 import org.apache.calcite.util.NlsString;
 import org.apache.calcite.util.SaffronProperties;
@@ -530,6 +531,12 @@ public class RexLiteral extends RexNode {
     }
   }
 
+  /** @deprecated Temporary shim while {@link ByteString} moves to a new
+   * package; will be removed before {@link Bug#upgrade(String) 1.0}. */
+  public byte byteValue() {
+    return ((ByteString) value).byteAt(0);
+  }
+
   public static boolean booleanValue(RexNode node) {
     return (Boolean) ((RexLiteral) node).value;
   }