Commit Graph

21 Commits

Author SHA1 Message Date
Amos Bird
ea84430864 Get rid of useless std::move to get NRVO
http://eel.is/c++draft/class.copy.elision#:constructor,copy,elision

Some quote:

> Speaking of RVO, return std::move(w); prohibits it. It means "use move constructor or fail to compile", whereas return w; means "use RVO, and if you can't, use move constructor, and if you can't, use copy constructor, and if you can't, fail to compile."

There is one exception to this rule:
```cpp
Block FilterBlockInputStream::removeFilterIfNeed(Block && block)
{
    if (block && remove_filter)
        block.erase(static_cast<size_t>(filter_column));

    return std::move(block);
}
```

because references are not eligible for NRVO, which is another rule "always move rvalue references and forward universal references" that takes precedence.
2018-08-27 22:15:48 +08:00
Nikolai Kochetov
9f591b8d02 Merged with master. 2018-06-26 17:41:29 +03:00
Nikolai Kochetov
f56d16769b Added pre and post serialization for IDataType BinaryBulkWithMultipleStreams. Supported dictionary serialization format with single global dictionary (limited wit max_dictionary_size) and additional keys which are stored per granule. Changed IDataType::enumerateStream interface. Added (de)serialization params for binary bulk with multiple stream (de)serialization. Changed IColumn::index interface. 2018-06-26 17:12:21 +03:00
Alexey Milovidov
1c2b024c39 Non significant changes according to clang's -Weverything, part 2 [#CLICKHOUSE-2] 2018-06-03 20:43:56 +03:00
Nikolai Kochetov
4369613435 added IColumn::select 2018-04-23 19:40:25 +03:00
alexey-milovidov
f358dc4125
Update ColumnString.h 2018-03-30 00:15:14 +03:00
alexey-milovidov
db53190854
Update ColumnString.h 2018-03-29 23:21:40 +03:00
Brett Hoerner
fef91af96f Fix build when using GCC 7.3.1: -Wmaybe-uninitialized error
Before adding this ignore you would receive the following when using GCC
7.3.1:

[ 82%] Building CXX object dbms/src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/StorageSystemAsynchronousMetrics.cpp.o
In file included from /ClickHouse/dbms/src/Storages/System/StorageSystemAsynchronousMetrics.cpp:5:0:
/ClickHouse/dbms/src/Columns/ColumnString.h: In member function ‘virtual DB::BlockInputStreams DB::StorageSystemAsynchronousMetrics::read(const Names&, const DB::SelectQueryInfo&, const DB::Context&, DB::QueryProcessingStage::Enum&, size_t, unsigned int)’:
/ClickHouse/dbms/src/Columns/ColumnString.h:96:45: error: ‘*((void*)&<anonymous> +8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         const size_t size_to_append = s.size() + 1;
                                       ~~~~~~^~
cc1plus: all warnings being treated as errors
make[2]: *** [dbms/src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/build.make:63: dbms/src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/StorageSystemAsynchronousMetrics.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:9105: dbms/src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
2018-03-29 12:02:09 -05:00
Nikolai Kochetov
476d4b339c Immutable construction for columns 2018-03-20 22:45:10 +03:00
Alexey Milovidov
7284a64740 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-16 00:32:25 +03:00
Alexey Milovidov
401fd2d6d8 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-15 05:36:40 +03:00
Alexey Milovidov
911d80ab51 Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-14 07:25:22 +03:00
Alexey Milovidov
fb38ef9a8e Better semantic of sharing columns: development [#CLICKHOUSE-2]. 2017-12-14 06:56:56 +03:00
Alexey Milovidov
3def5f03f5 Cleanup semantics of data types [#CLICKHOUSE-2]. 2017-12-09 19:17:37 +03:00
Alexey Milovidov
d9c87bf4df Simplification of Nullable [#CLICKHOUSE-2] 2017-12-08 01:11:51 +03:00
Alexey Milovidov
bdd25b15bd Better [#CLICKHOUSE-2]. 2017-12-01 22:34:51 +03:00
Nikolai Kochetov
985e449bd3 added IDataType::updateAvgValueSizeHints; renamed PODArray::allocated_size to PODArray::allocated_bytes; renamed renamed IColumn::allocatedSize to IColumn::allocatedBytes; removed IColumn.h from IDataType.h 2017-07-13 19:49:09 +03:00
Nikolai Kochetov
d67a6c08cd fixed allocated size calculation for ColumnString and ColumnVector 2017-07-13 17:41:55 +03:00
Alexey Zatelepin
1cd936579d introduce IColumn::gather() [#CLICKHOUSE-3118] 2017-07-09 21:57:06 +03:00
Alexey Zatelepin
87fbfe0950 correct comparisons for strings with null bytes [#CLICKHOUSE-3070] 2017-06-22 23:10:43 +03:00
Alexey Milovidov
310736cd7e Moved headers and sources to same place [#CLICKHOUSE-3]. 2017-04-01 12:22:42 +03:00