Commit Graph

193 Commits

Author SHA1 Message Date
alexey-milovidov
9eca78273f Update AggregateFunctionSumMap.h 2017-10-13 21:51:03 +03:00
alexey-milovidov
1984782321 Update AggregateFunctionSumMap.h 2017-10-13 21:51:03 +03:00
Marek Vavruša
2edf5492d0 AggregateFunctionSumMap: support variardic arguments, specialized keys
The function is rewritten to avoid allocations on every insert with
Field deserialising each array. The key type is now specialized,
so it can be accessed directly. The value type is variant type,
but only individual values are deserialised (which is cheap, since they're PODs).
The function also support summing of multiple columns by the same key.

The SummingSortedBlockInputStream uses the function in case of
Nested structure with one numeric key and many values to sum.
2017-10-13 21:51:03 +03:00
alexey-milovidov
2dfb3fa463 Update AggregateFunctionTopK.h 2017-10-09 01:12:38 +03:00
alexey-milovidov
6e5ea5cc10 Update AggregateFunctionTopK.h 2017-10-09 01:12:38 +03:00
Marek Vavruša
28bb5e25cf AggregateFunctionTopK: read alphaMap for generic
* the alpha_map vector always (de)serialises
  the actual version (could empty sometimes)
* AggregateFunctionTopK generic variant deserialises
  it as well instead of ignoring it
* AggregateFunctionTopK generic variant clears the
  array before deserialising

refs #1283
2017-10-09 01:12:38 +03:00
Alex Bocharov
e99c969a1c Aggregate function sumMap: improve insertResultInto method and change return type to Tuple(Array(K), Array(V)). 2017-09-19 13:35:25 +01:00
Alex Bocharov
07cd6829d0 Aggregate function sumMap: fix compilation error regarding getHeaderFilePath after merge with master. 2017-09-18 19:37:44 +01:00
Alex Bocharov
1f70d0e163 Resolve conflict in SummingSortedBlockInputStream when moving FieldVisitorSum. 2017-09-18 18:43:47 +01:00
Alex Bocharov
c1feea159e Aggregate function sumMap: optimize serialize/deserialize. 2017-09-18 18:11:16 +01:00
Alex Bocharov
6e74602e45 Aggregate function sumMap: use FieldVisitorSum instead of += operator. 2017-09-18 16:41:07 +01:00
alexey-milovidov
edb66bfffe Merge branch 'master' into master 2017-09-18 10:31:31 +03:00
Alexey Milovidov
ff1598c8d1 Improved performance of dynamic compilation [#CLICKHOUSE-2]. 2017-09-17 23:22:39 +03:00
Alexey Milovidov
156d48f3ee Removed aggregate function "debug" [#CLICKHOUSE-2]. 2017-09-17 23:12:02 +03:00
Alexey Milovidov
dd3e74c0eb Fixed weird translation [#CLICKHOUSE-2]. 2017-09-17 21:17:04 +03:00
Alexey Milovidov
86c46ad1bd Unification [#CLICKHOUSE-2]. 2017-09-15 15:16:12 +03:00
Alex Bocharov
591cd5c009 Add new aggregate function sumMap(key, value). 2017-09-15 12:14:19 +01:00
Alexey Milovidov
cd540c2674 Replaced Mersenne Twister to PCG-Random [#CLICKHOUSE-2]. 2017-09-10 02:17:38 +03:00
Alexey Milovidov
be79166199 Using pcg-random instead of boost::random::taus88 [#CLICKHOUSE-3174]. 2017-09-09 02:58:42 +03:00
Alexey Milovidov
c0324aeb66 Removed useless header [#CLICKHOUSE-3174]. 2017-09-09 02:40:48 +03:00
proller
aa1f27553e Header compile fixes 2017-09-01 22:05:29 +03:00
proller
1a8e22c37f Allow compile on 32bit systems (#1175)
* Trying compile under 32bit..

* PerformanceTest: use getMultiple*FromConfig, fix debug helpers

* Missing file

* clnag-format of Split ComplexKeyCacheDictionary

* wip

* Requested changes

* wip

* wip

* Fix boost 1.64 and gcc7+ compile errors

* More fixes

* wip

* Fix arm build

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* clean

* fix

* wip

* wip

* clean

* clean

* wip

* wip

* Update MergeTreeSettings.h

* Requested changes

* Requested changes

* Requested changes

* Requested changes
2017-09-01 20:21:03 +03:00
Alexey Milovidov
1531268281 Added aggregate functions groupBitAnd, groupBitOr, groupBitXor [#CLICKHOUSE-2]. 2017-08-30 21:52:14 +03:00
Alexey Milovidov
495daffa16 Miscellaneous [#CLICKHOUSE-2]. 2017-08-30 21:13:32 +03:00
Alexey Zatelepin
eec6a3ecb9 add forgotten aggregate functions to SpecializedAggregator.h [#CLICKHOUSE-3247] 2017-08-23 17:00:36 +03:00
Alexey Zatelepin
ec96183f59 put AggregateFunctionStatistics implementation out of anonymous namespace [#CLICKHOUSE-3247] 2017-08-23 17:00:36 +03:00
Alexey Zatelepin
8620dd6876 runtime compilation fix: put groupArray implementation out of anonymous namespace [#CLICKHOUSE-3247]
Demangled symbols from anonymous namespace contain "::(anonymous namespace)::" string
and thus cannot be used with runtime compilation of aggregation functions.
2017-08-23 17:00:36 +03:00
Alexey Milovidov
75f1df36e4 Miscellaneous [#CLICKHOUSE-2]. 2017-08-22 20:29:02 +03:00
Vadim Skipin
5f4e833925 Cleanup function factories:
* Switch to std::function to allow more complex creator logic
* Cleanup headers
2017-08-18 21:15:57 +03:00
Vitaliy Lyudvichenko
f36caa9c99 Parameter rename. [#CLICKHOUSE-3213] 2017-08-12 03:46:42 +03:00
Vitaliy Lyudvichenko
04dcec32b4 Specialized implementation of groupArray() for Date and DateTime. [#CLICKHOUSE-3213] 2017-08-12 03:46:42 +03:00
Alexey Milovidov
ce4349b6cd Fixed error when huge sets for IN, JOIN, DISTINCT cannot be created with exception message "Cannot mremap... Bad address" [#CLICKHOUSE-2]. 2017-08-11 02:25:51 +03:00
proller
ac178bde1f Cmake: link ltdl with pocoodbc static only. rename ARM -> ARCH_ARM (#1083)
* Cmake: link ltdl with pocoodbc static only. rename ARM -> ARCH_ARM

* Fix lib find order

* Allow define non-contrib cityhash farmhash metrohash

* Fix message

* Cmake: fixes

* clean

* Update CMakeLists.txt
2017-08-09 23:52:55 +03:00
proller
8f6c2d4e47 Fix .h compile 2017-08-01 18:02:16 +03:00
Alexey Milovidov
3502d36d7d Fixed build [#CLICKHOUSE-2]. 2017-07-28 02:23:13 +03:00
Alexey Milovidov
e4af70149f Fixed build [#CLICKHOUSE-2]. 2017-07-28 00:27:10 +03:00
Alexey Milovidov
6851a7754a Fixed linkage [#CLICKHOUSE-2]. 2017-07-25 21:32:52 +03:00
Vitaliy Lyudvichenko
870b1aefcb Get rid of of PODArray copypaste. [#CLICKHOUSE-3084] 2017-07-25 20:04:10 +03:00
Vitaliy Lyudvichenko
fefb4dad67 Get rid of old groupArray() implementations. [#CLICKHOUSE-3084] 2017-07-25 20:04:10 +03:00
Vitaliy Lyudvichenko
792faaa2db Add adaptive allocator. [#CLICKHOUSE-3084] 2017-07-25 20:04:10 +03:00
Vitaliy Lyudvichenko
03e5bf9471 Add support of parameters in aggregate function constructors. [#CLICKHOUSE-3084] 2017-07-25 20:04:10 +03:00
Vitaliy Lyudvichenko
c3a15da3f8 Add support of limit parameter into groupArray. [#CLICKHOUSE-3084] 2017-07-25 20:04:10 +03:00
Vitaliy Lyudvichenko
c2cc8d6147 Add several groupArray implementations. [#CLICKHOUSE-3084] 2017-07-25 20:04:10 +03:00
proller
57b9bcd354 Fix missing includes 2017-07-24 18:04:49 +03:00
alexey-milovidov
d4d266fa18 ColumnConst unification (#1011)
* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* Fixed error in ColumnArray::replicateGeneric [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].

* ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].
2017-07-21 09:35:58 +03:00
Alexey Milovidov
5c3ca0c16e Inverted dependency in DataTypeFactory [#CLICKHOUSE-3149]. 2017-07-16 07:11:11 +03:00
Nikolai Kochetov
283810e8ab merged with master 2017-07-13 23:59:34 +03:00
Nikolai Kochetov
75be0b81d8 removed typeid_cast from IColumn.h 2017-07-13 23:58:19 +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
Alexey Milovidov
be1710ecef Using lexer (development) [#CLICKHOUSE-2]. 2017-07-13 08:59:01 +03:00