quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hakanmemiso...@apache.org
Subject incubator-quickstep git commit: Changed proto decsription.
Date Tue, 21 Jun 2016 20:14:50 GMT
Repository: incubator-quickstep
Updated Branches:
  refs/heads/decimal-type aebb4a3bd -> cf33c724a


Changed proto decsription.


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

Branch: refs/heads/decimal-type
Commit: cf33c724a0b16168fd4f104bf166bc19abafbe46
Parents: aebb4a3
Author: Hakan Memisoglu <hakanmemisoglu@apache.org>
Authored: Tue Jun 21 15:14:30 2016 -0500
Committer: Hakan Memisoglu <hakanmemisoglu@apache.org>
Committed: Tue Jun 21 15:14:30 2016 -0500

----------------------------------------------------------------------
 types/TypedValue.cpp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/cf33c724/types/TypedValue.cpp
----------------------------------------------------------------------
diff --git a/types/TypedValue.cpp b/types/TypedValue.cpp
index e964400..2989c37 100644
--- a/types/TypedValue.cpp
+++ b/types/TypedValue.cpp
@@ -178,10 +178,15 @@ TypedValue TypedValue::ReconstructFromProto(const serialization::TypedValue
&pro
       return proto.has_double_value() ?
           TypedValue(static_cast<double>(proto.double_value())) :
           TypedValue(kDouble);
-    case serialization::Type::DECIMAL:
-      return proto.has_decimal_value() ?
-          TypedValue(DecimalLit{proto.decimal_value()}) :
-          TypedValue(kDecimal);
+    case serialization::Type::DECIMAL: {
+      if (proto.has_decimal_value()) {
+        DecimalLit result;
+        result.data_ = proto.decimal_value();
+        return TypedValue(result);
+      } else {
+        return TypedValue(kDecimal);
+      }
+    }
     case serialization::Type::DATETIME:
       if (proto.has_datetime_value()) {
         DatetimeLit datetime;


Mime
View raw message