diff --git a/utils/rowgroup/rowgroup.h b/utils/rowgroup/rowgroup.h index c4b419393..373269e13 100644 --- a/utils/rowgroup/rowgroup.h +++ b/utils/rowgroup/rowgroup.h @@ -375,7 +375,6 @@ public: inline std::string getStringField(uint32_t colIndex) const; inline const uint8_t* getStringPointer(uint32_t colIndex) const; inline uint32_t getStringLength(uint32_t colIndex) const; - inline const char* getCharPtrField(uint32_t colIndex, int& len) const; void setStringField(const std::string& val, uint32_t colIndex); inline void setStringField(const uint8_t*, uint32_t len, uint32_t colIndex); @@ -775,17 +774,6 @@ inline std::string Row::getStringField(uint32_t colIndex) const strnlen((char*) &data[offsets[colIndex]], getColumnWidth(colIndex))); } -// Return a char* to the string field with len -inline const char* Row::getCharPtrField(uint32_t colIndex, int& len) const -{ - len = getStringLength(colIndex); - if (inStringTable(colIndex)) - { - return (const char*)strings->getPointer(*((uint64_t*) &data[offsets[colIndex]])); - } - return (char*)&data[offsets[colIndex]]; -} - inline std::string Row::getVarBinaryStringField(uint32_t colIndex) const { if (inStringTable(colIndex)) diff --git a/utils/windowfunction/idborderby.cpp b/utils/windowfunction/idborderby.cpp index 1f87a33e9..437f56bf4 100644 --- a/utils/windowfunction/idborderby.cpp +++ b/utils/windowfunction/idborderby.cpp @@ -130,9 +130,10 @@ int StringCompare::operator()(IdbCompare* l, Row::Pointer r1, Row::Pointer r2) } else { - int len1, len2; - const char* s1 = l->row1().getCharPtrField(fSpec.fIndex, len1); - const char* s2 = l->row2().getCharPtrField(fSpec.fIndex, len2); + int len1 = l->row1().getStringLength(fSpec.fIndex); + int len2 = l->row2().getStringLength(fSpec.fIndex); + const char* s1 = (const char*)l->row1().getStringPointer(fSpec.fIndex); + const char* s2 = (const char*)l->row2().getStringPointer(fSpec.fIndex); const std::collate& coll = std::use_facet >(loc); ret = fSpec.fAsc * coll.compare(s1, s1+len1, s2, s2+len2); }