You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ji...@apache.org on 2017/10/05 22:17:11 UTC
[06/40] incubator-quickstep git commit: Continue the work
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/05496b97/types/operations/OperationFactory.hpp
----------------------------------------------------------------------
diff --git a/types/operations/OperationFactory.hpp b/types/operations/OperationFactory.hpp
index 3e90b6d..b3fd9b4 100644
--- a/types/operations/OperationFactory.hpp
+++ b/types/operations/OperationFactory.hpp
@@ -26,8 +26,8 @@
#include <utility>
#include <vector>
+#include "types/GenericValue.hpp"
#include "types/TypeID.hpp"
-#include "types/TypedValue.hpp"
#include "types/operations/Operation.hpp"
#include "types/operations/OperationSignature.hpp"
#include "types/operations/binary_operations/BinaryOperation.hpp"
@@ -104,9 +104,9 @@ class OperationFactory {
OperationSignaturePtr resolveOperation(
const std::string &operation_name,
const std::shared_ptr<const std::vector<const Type*>> &argument_types,
- const std::shared_ptr<const std::vector<TypedValue>> &static_arguments,
+ const std::shared_ptr<const std::vector<GenericValue>> &static_arguments,
std::shared_ptr<const std::vector<const Type*>> *coerced_argument_types,
- std::shared_ptr<const std::vector<TypedValue>> *coerced_static_arguments,
+ std::shared_ptr<const std::vector<GenericValue>> *coerced_static_arguments,
std::string *message) const;
private:
@@ -155,8 +155,8 @@ class OperationFactory {
const PartialSignatureIndex &secondary_index,
const std::vector<TypeID> &argument_type_ids,
const std::vector<const Type*> &argument_types,
- const std::vector<TypedValue> &static_arguments,
- std::shared_ptr<const std::vector<TypedValue>> *trimmed_static_arguments,
+ const std::vector<GenericValue> &static_arguments,
+ std::shared_ptr<const std::vector<GenericValue>> *coerced_static_arguments,
OperationSignaturePtr *resolved_op_signature,
std::string *message) const;
@@ -164,9 +164,9 @@ class OperationFactory {
const PartialSignatureIndex &secondary_index,
const std::vector<TypeID> &argument_type_ids,
const std::vector<const Type*> &argument_types,
- const std::vector<TypedValue> &static_arguments,
+ const std::vector<GenericValue> &static_arguments,
std::shared_ptr<const std::vector<const Type*>> *coerced_argument_types,
- std::shared_ptr<const std::vector<TypedValue>> *coerced_static_arguments,
+ std::shared_ptr<const std::vector<GenericValue>> *coerced_static_arguments,
OperationSignaturePtr *resolved_op_signature,
std::string *message) const;
@@ -174,15 +174,15 @@ class OperationFactory {
// const std::set<OperationSignaturePtr> signatures,
// const std::vector<TypeID> &argument_type_ids,
// const std::vector<const Type*> &argument_types,
-// const std::vector<TypedValue> &static_arguments,
+// const std::vector<GenericValue> &static_arguments,
// std::shared_ptr<const std::vector<const Type*>> *coerced_argument_types,
-// std::shared_ptr<const std::vector<TypedValue>> *coerced_static_arguments,
+// std::shared_ptr<const std::vector<GenericValue>> *coerced_static_arguments,
// OperationSignaturePtr *op_signature,
// std::string *message) const;
bool canApplyOperationTo(const OperationPtr operation,
const std::vector<const Type*> &argument_types,
- const std::vector<TypedValue> &static_arguments,
+ const std::vector<GenericValue> &static_arguments,
std::string *message) const;
std::unordered_map<OperationSignaturePtr,
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/05496b97/types/operations/comparisons/BasicComparison.hpp
----------------------------------------------------------------------
diff --git a/types/operations/comparisons/BasicComparison.hpp b/types/operations/comparisons/BasicComparison.hpp
index bf80e50..1d4bbdc 100644
--- a/types/operations/comparisons/BasicComparison.hpp
+++ b/types/operations/comparisons/BasicComparison.hpp
@@ -245,8 +245,8 @@ bool BasicComparison::compareTypedValuesCheckedHelper(const TypedValue &left,
const Type *unifier = TypeFactory::GetUnifyingType(left_type, right_type);
DCHECK(unifier != nullptr);
- const TypedValue left_coerced = unifier->coerceValue(left, left_type);
- const TypedValue right_coerced = unifier->coerceValue(right, right_type);
+ const TypedValue left_coerced = unifier->coerceTypedValue(left, left_type);
+ const TypedValue right_coerced = unifier->coerceTypedValue(right, right_type);
switch (unifier->getTypeID()) {
case kInt: {
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/05496b97/types/operations/unary_operations/CastOperation.hpp
----------------------------------------------------------------------
diff --git a/types/operations/unary_operations/CastOperation.hpp b/types/operations/unary_operations/CastOperation.hpp
index 140c152..7270dec 100644
--- a/types/operations/unary_operations/CastOperation.hpp
+++ b/types/operations/unary_operations/CastOperation.hpp
@@ -131,7 +131,7 @@ class CastOperation : public UnaryOperation {
return &TypeFactory::GetType(it->second);
} else {
TypedValue length_value;
- if (IntType::InstanceNonNullable().parseValueFromString(length_str, &length_value)) {
+ if (IntType::InstanceNonNullable().parseTypedValueFromString(length_str, &length_value)) {
return &TypeFactory::GetType(
it->second,
static_cast<std::size_t>(length_value.getLiteral<int>()),