Commit Graph

32 Commits

Author SHA1 Message Date
Pavel Kruglov
70b51133c1 Try to simplify code 2021-08-09 18:01:08 +03:00
Pavel Kruglov
0662df8b76 Fix performance with JIT, add arguments to function isSuitableForShortCircuitArgumentsExecution 2021-08-09 17:54:14 +03:00
Pavel Kruglov
e792fa588f Mark all Functions as sutable or not for executing as short circuit arguments 2021-08-09 17:50:09 +03:00
kssenii
9cb10aae3c Some fixes 2021-07-18 03:43:08 +00:00
kssenii
3ba2d114d5 Revert "Merge pull request #26352 from ClickHouse/revert-25774-datatype-date32"
This reverts commit 94a210650f, reversing
changes made to 0893b9ff8e.
2021-07-15 11:41:52 +00:00
alexey-milovidov
9ba4064c86
Revert "Datatype Date32, support range 1925 to 2283" 2021-07-15 10:53:35 +03:00
Neng Liu
aadc2af5cb add some functional test 2021-06-22 19:10:56 +08:00
Neng Liu
7ed1728a37 Merge branch 'master' into datatype-date32
# Conflicts:
#	src/DataTypes/IDataType.h
#	src/Functions/CustomWeekTransforms.h
2021-06-22 10:00:18 +08:00
neng.liu
45e9e9f8bb fix some compile problem 2021-06-17 08:08:29 -07:00
Neng Liu
b6eab5fd2f add datetype32 function support 2021-06-17 16:05:30 +08:00
mergify[bot]
d68d5e0ef1
Merge branch 'master' into rename-const-context-ptr 2021-06-04 14:41:41 +00:00
Kruglov Pavel
8acf031c1b
Merge pull request #24398 from Avogar/fix-deltasum
Fix logical error AggregateFunctionFactory returned nullptr
2021-06-03 19:40:06 +03:00
Nikolai Kochetov
dbaa6ffc62 Rename ContextConstPtr to ContextPtr. 2021-06-01 15:20:52 +03:00
Alexander Kuzmenkov
3f57fc085b remove mutable context references from functions interface
Also remove it from some visitors.
2021-05-28 19:45:37 +03:00
Pavel Kruglov
42d57138f2 replace all isDateOrDateTime invocations to explicit calls to isDate and isDateTime and isDateTime64 2021-05-28 15:34:49 +03:00
Maksim Kita
d923d9e6ef Function move file 2021-05-17 10:30:42 +03:00
Maksim Kita
947f28d430 IFunction refactoring 2021-05-15 20:33:15 +03:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr (#22297)
* Replace all Context references with std::weak_ptr

* Fix shared context captured by value

* Fix build

* Fix Context with named sessions

* Fix copy context

* Fix gcc build

* Merge with master and fix build

* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
Vasily Nemkov
2d03d330bc Extended range of DateTime64 to years 1925 - 2238
The Year 1925 is a starting point because most of the timezones
switched to saner (mostly 15-minutes based) offsets somewhere
during 1924 or before. And that significantly simplifies implementation.

2238 is to simplify arithmetics for sanitizing LUT index access;
there are less than 0x1ffff days from 1925.

* Extended DateLUTImpl internal LUT to 0x1ffff items, some of which
  represent negative (pre-1970) time values.
  As a collateral benefit, Date now correctly supports dates up to 2149
  (instead of 2106).
* Added a new strong typedef ExtendedDayNum, which represents dates
  pre-1970 and post 2149.
* Functions that used to return DayNum now return ExtendedDayNum.
* Refactored DateLUTImpl to untie DayNum from the dual role of being
  a value and an index (due to negative time). Index is now a different
  type LUTIndex with explicit conversion functions from DatNum, time_t,
  and ExtendedDayNum.
* Updated DateLUTImpl to properly support values close to epoch start
  (1970-01-01 00:00), including negative ones.
* Reduced resolution of DateLUTImpl::Values::time_at_offset_change
  to multiple of 15-minutes to allow storing 64-bits of time_t in
  DateLUTImpl::Value while keeping same size.
* Minor performance updates to DateLUTImpl when building month LUT
  by skipping non-start-of-month days.
* Fixed extractTimeZoneFromFunctionArguments to work correctly
  with DateTime64.
* New unit-tests and stateless integration tests for both DateTime
  and DateTime64.
2021-02-24 17:08:35 +02:00
Ivan Lezhankin
f897f7c93f Refactor IFunction to execute with const arguments 2020-11-17 16:24:45 +03:00
Nikolai Kochetov
ce2f6a0560 Part 4. 2020-10-18 00:41:50 +03:00
Nikolai Kochetov
959424f28a Rename block to columns. 2020-10-14 17:04:50 +03:00
Nikolai Kochetov
966b1d6cf5 Rename Block to ColumnsWithTypeAndName. 2020-10-14 16:09:11 +03:00
Nikolai Kochetov
9b42bfdc36
Merge pull request #15817 from ClickHouse/new-block-for-functions-2
Use `ColumnsWithTypeAndName` instead of `Block` for function calls [part 2]
2020-10-12 00:32:58 +03:00
Alexey Milovidov
269b6383f5 Check for #pragma once in headers 2020-10-10 21:37:02 +03:00
Nikolai Kochetov
d28325a353 Replace getByPosition to [] 2020-10-10 21:24:57 +03:00
bharatnc
5c8c636cf1 Fix - allow empty tz in exp like toStartOf*(today()) 2020-09-25 11:03:16 -07:00
bharatnc
8fd00ff77b rename test files and fix tests - add ; at the end 2020-09-04 18:42:43 -07:00
bharatnc
cf110f4eb0 toStartOfInterval* functions - disallow empty timezone 2020-09-04 17:32:38 -07:00
Nikolai Kochetov
e4689ce302 Make IFunction::executeImpl const. 2020-07-21 16:58:07 +03:00
Vasily Nemkov
2c2005817f New function toStartOfSecond(DateTime64) -> DateTime64
This funtion nullifies sub-second part of DateTime64 value.
2020-05-11 12:06:06 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00