You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ha...@apache.org on 2016/06/23 17:45:49 UTC
incubator-quickstep git commit: The changes to prevent errors from
linter.
Repository: incubator-quickstep
Updated Branches:
refs/heads/decimal-type cf33c724a -> 2d1710945
The changes to prevent errors from linter.
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/2d171094
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/2d171094
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/2d171094
Branch: refs/heads/decimal-type
Commit: 2d17109453c64b96d38fcfc8af77bfc1b44a7582
Parents: cf33c72
Author: Hakan Memisoglu <ha...@apache.org>
Authored: Thu Jun 23 12:44:51 2016 -0500
Committer: Hakan Memisoglu <ha...@apache.org>
Committed: Thu Jun 23 12:44:59 2016 -0500
----------------------------------------------------------------------
types/DecimalLit.hpp | 53 +++++++-------------
types/DecimalType.cpp | 25 +++++----
types/DecimalType.hpp | 25 +++++----
.../operations/unary_operations/CMakeLists.txt | 1 +
4 files changed, 46 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/2d171094/types/DecimalLit.hpp
----------------------------------------------------------------------
diff --git a/types/DecimalLit.hpp b/types/DecimalLit.hpp
index 2b1ae8a..db21b4d 100644
--- a/types/DecimalLit.hpp
+++ b/types/DecimalLit.hpp
@@ -1,17 +1,20 @@
/**
- * Copyright 2016, Quickstep Research Group, Computer Sciences Department,
- * University of Wisconsin\u2014Madison.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
* limitations under the License.
**/
@@ -42,7 +45,7 @@ struct DecimalLit {
: data_(static_cast<data_type>(value * kMaxFractionInt)) {
}
- explicit DecimalLit(const long value)
+ explicit DecimalLit(const std::int64_t value)
: data_(static_cast<data_type>(value * kMaxFractionInt)) {
}
@@ -58,8 +61,8 @@ struct DecimalLit {
return static_cast<int>(getIntegerPart());
}
- inline explicit operator long() const {
- return static_cast<long>(getIntegerPart());
+ inline explicit operator std::int64_t() const {
+ return static_cast<std::int64_t>(getIntegerPart());
}
inline explicit operator float() const {
@@ -70,28 +73,6 @@ struct DecimalLit {
return static_cast<double>(data_) / kMaxFractionInt;
}
- /**
- * @brief Builder for DecimalLit.
- *
- * @param value Corresponding floating point number to be converted to
- * the DecimalLit.
- * @return The resulting DecimalLit converted from the floating point.
- **/
- //static DecimalLit fromDouble(const double value) {
- // return DecimalLit{static_cast<data_type>(value * kMaxFractionInt)};
- //}
-
- /**
- * @brief Builder for DecimalLit.
- *
- * @param value Corresponding integer number to be converted to
- * the DecimalLit.
- * @return The resulting DecimalLit conveted from the integer number.
- **/
- //static DecimalLit fromInt(const int64_t value) {
- // return DecimalLit{static_cast<data_type>(value * kMaxFractionInt)};
- //}
-
data_type data_;
/**
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/2d171094/types/DecimalType.cpp
----------------------------------------------------------------------
diff --git a/types/DecimalType.cpp b/types/DecimalType.cpp
index 71283e3..661dad1 100644
--- a/types/DecimalType.cpp
+++ b/types/DecimalType.cpp
@@ -1,17 +1,20 @@
/**
- * Copyright 2016, Quickstep Research Group, Computer Sciences Department,
- * University of Wisconsin\u2014Madison.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
* limitations under the License.
**/
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/2d171094/types/DecimalType.hpp
----------------------------------------------------------------------
diff --git a/types/DecimalType.hpp b/types/DecimalType.hpp
index 27ba2c1..a028290 100644
--- a/types/DecimalType.hpp
+++ b/types/DecimalType.hpp
@@ -1,17 +1,20 @@
/**
- * Copyright 2016, Quickstep Research Group, Computer Sciences Department,
- * University of Wisconsin\u2014Madison.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
* limitations under the License.
**/
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/2d171094/types/operations/unary_operations/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/types/operations/unary_operations/CMakeLists.txt b/types/operations/unary_operations/CMakeLists.txt
index 2521b69..619f562 100644
--- a/types/operations/unary_operations/CMakeLists.txt
+++ b/types/operations/unary_operations/CMakeLists.txt
@@ -76,6 +76,7 @@ target_link_libraries(quickstep_types_operations_unaryoperations_NumericCastOper
quickstep_catalog_CatalogTypedefs
quickstep_storage_ValueAccessor
quickstep_storage_ValueAccessorUtil
+ quickstep_types_DecimalType
quickstep_types_DoubleType
quickstep_types_FloatType
quickstep_types_IntType