You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2019/02/11 18:42:44 UTC

[kudu] 02/03: [client] Mark GetUnscaledDecimal as const

This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch branch-1.9.x
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit a16d2e5e05114d046dae6b7bdbe30a975bbc5272
Author: Grant Henke <gr...@apache.org>
AuthorDate: Mon Feb 11 10:15:53 2019 -0600

    [client] Mark GetUnscaledDecimal as const
    
    The KuduPartialRow::GetUnscaledDecimal functions
    are missing the const keyword.
    
    Change-Id: I91d1d21a76179ff511eb5723958dcfb3d5eae0a2
    Reviewed-on: http://gerrit.cloudera.org:8080/12434
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 src/kudu/common/partial_row.cc | 4 ++--
 src/kudu/common/partial_row.h  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/kudu/common/partial_row.cc b/src/kudu/common/partial_row.cc
index b20ce33..a40b98e 100644
--- a/src/kudu/common/partial_row.cc
+++ b/src/kudu/common/partial_row.cc
@@ -643,7 +643,7 @@ Status KuduPartialRow::GetFloat(const Slice& col_name, float* val) const {
 Status KuduPartialRow::GetDouble(const Slice& col_name, double* val) const {
   return Get<TypeTraits<DOUBLE> >(col_name, val);
 }
-Status KuduPartialRow::GetUnscaledDecimal(const Slice &col_name, int128_t *val) {
+Status KuduPartialRow::GetUnscaledDecimal(const Slice &col_name, int128_t *val) const {
   int col_idx;
   RETURN_NOT_OK(FindColumn(*schema_, col_name, &col_idx));
   return GetUnscaledDecimal(col_idx, val);
@@ -679,7 +679,7 @@ Status KuduPartialRow::GetFloat(int col_idx, float* val) const {
 Status KuduPartialRow::GetDouble(int col_idx, double* val) const {
   return Get<TypeTraits<DOUBLE> >(col_idx, val);
 }
-Status KuduPartialRow::GetUnscaledDecimal(int col_idx, int128_t *val) {
+Status KuduPartialRow::GetUnscaledDecimal(int col_idx, int128_t *val) const {
   const ColumnSchema& col = schema_->column(col_idx);
   const DataType col_type = col.type_info()->type();
   switch (col_type) {
diff --git a/src/kudu/common/partial_row.h b/src/kudu/common/partial_row.h
index 36e0c78..3dca69d 100644
--- a/src/kudu/common/partial_row.h
+++ b/src/kudu/common/partial_row.h
@@ -361,7 +361,7 @@ class KUDU_EXPORT KuduPartialRow {
   Status GetFloat(const Slice& col_name, float* val) const WARN_UNUSED_RESULT;
   Status GetDouble(const Slice& col_name, double* val) const WARN_UNUSED_RESULT;
 #if KUDU_INT128_SUPPORTED
-  Status GetUnscaledDecimal(const Slice& col_name, int128_t* val) WARN_UNUSED_RESULT;
+  Status GetUnscaledDecimal(const Slice& col_name, int128_t* val) const WARN_UNUSED_RESULT;
 #endif
   ///@}
 
@@ -394,7 +394,7 @@ class KUDU_EXPORT KuduPartialRow {
   Status GetFloat(int col_idx, float* val) const WARN_UNUSED_RESULT;
   Status GetDouble(int col_idx, double* val) const WARN_UNUSED_RESULT;
 #if KUDU_INT128_SUPPORTED
-  Status GetUnscaledDecimal(int col_idx, int128_t* val) WARN_UNUSED_RESULT;
+  Status GetUnscaledDecimal(int col_idx, int128_t* val) const WARN_UNUSED_RESULT;
 #endif
   ///@}