1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

A cleanup for MCOL-4064 Make JOIN collation aware

A non-JOIN condition like `WHERE c1=c2` (with c1 and c2 being columns of the
same table) was not collation-aware yet after the main patches for MCOL-4064.

Additionally fixing StrFilterCmd::compare*() to address this.
This commit is contained in:
Alexander Barkov
2020-12-08 13:10:51 +04:00
parent 23df62e337
commit b08d719593
4 changed files with 112 additions and 126 deletions

45
datatypes/mcs_string.h Normal file
View File

@ -0,0 +1,45 @@
/* Copyright (C) 2020 MariaDB Corporation.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
#ifndef MCS_DATATYPES_STRING_H
#define MCS_DATATYPES_STRING_H
#include "conststring.h"
namespace datatypes
{
class TCharShort
{
int64_t mValue;
public:
TCharShort(int64_t value)
:mValue(value)
{ }
explicit operator utils::ConstString() const
{
utils::ConstString res = utils::ConstString((const char *) &mValue, 8);
return res.rtrimZero();
}
};
} // namespace datatypes
#endif // MCS_DATATYPES_STRING_H