Merge pull request #10809 from Enmk/DateLUTImpl_ctor_fix

Fixed DateLUTImpl constructors to avoid accidental copying
This commit is contained in:
alexey-milovidov 2020-05-11 20:19:44 +03:00 committed by GitHub
commit 61496384b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -37,7 +37,12 @@ using YearWeek = std::pair<UInt16, UInt8>;
class DateLUTImpl
{
public:
DateLUTImpl(const std::string & time_zone);
explicit DateLUTImpl(const std::string & time_zone);
DateLUTImpl(const DateLUTImpl &) = delete;
DateLUTImpl & operator=(const DateLUTImpl &) = delete;
DateLUTImpl(const DateLUTImpl &&) = delete;
DateLUTImpl & operator=(const DateLUTImpl &&) = delete;
public:
/// The order of fields matters for alignment and sizeof.

View File

@ -45,7 +45,7 @@ private:
size_t rows_removed = 0;
Logger * log;
DateLUTImpl date_lut;
const DateLUTImpl & date_lut;
/// TODO rewrite defaults logic to evaluteMissingDefaults
std::unordered_map<String, String> defaults_result_column;