Commit Graph

77 Commits

Author SHA1 Message Date
Konstantin Bogdanov
67c1e89d90
Apply linter changes 2024-10-06 12:29:20 +02:00
Robert Schulze
1ed6ea7469
Functions: Iterate over input_rows_count where appropriate 2024-07-28 13:26:42 +00:00
Shuai li
48cb228c9a
Fix addDays cause an error when used datetime64 (#61561)
* Fix addDays cause an error when used datetime64

* add exception describe

* Update tests/queries/0_stateless/03013_addDays_with_timezone.sql

* remove file be executable

* fix timezone

* fix ci

---------

Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
2024-03-21 14:47:29 +01:00
Robert Schulze
bb856680e7
Incorporated review feedback 2023-10-23 14:07:14 +00:00
Robert Schulze
c2215cb5f0
Support string arguments 2023-10-22 09:28:45 +00:00
Robert Schulze
69a387b778
Refactorings in FunctionDateOrDateTimeAddInterval 2023-10-20 15:47:16 +00:00
Michael Kolupaev
a5fbac9e6b Fix adding sub-second intervals to DateTime 2023-08-21 12:33:21 -07:00
Robert Schulze
72b9d75a84
Add compat setting for non-const timezones
SQL function toTimezone() converts a Date or DateTime into another
timezone. The problem is that the timezone is part of the Date /
DateTime type but not part of the internal representation (value). This
led to the fact that toTimeZone() wqith non-const timezones produced
wrong and misleading results until #48471 (shipped with v23.4) enforced
a const timezone.

Unfortunately, this PR also broke existing table definitions with
non-const timezones, e.g. in ALIAS expressions. So while #48471
addressed the issue appropriately, it is really backwards-incompatible.

This PR adds a setting to toggle the behavior and makes it also part of
the compatibility profile.
2023-06-10 16:56:42 +00:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
ltrk2
47455fa1f0 Bring interval subtraction from datetime in line with addition 2022-12-14 15:39:41 -05:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Alexey Milovidov
5224fc4d7f Fix strange code 2022-09-19 08:53:20 +02:00
Alexey Milovidov
d1275091e8 Fix strange code 2022-09-19 08:53:20 +02:00
Alexey Milovidov
730655d4fd Fix 8/9 of trash 2022-09-19 08:53:20 +02:00
Alexey Milovidov
91baedf03a Fix 6/7 of trash 2022-09-19 08:53:20 +02:00
Robert Schulze
164fc3d296
style: improve code aesthetics 2022-08-17 20:39:37 +00:00
zvonand
9367a8df68 no_sanitize_undefined 2022-02-18 14:53:22 +03:00
zvonand
8d34797212 AST fix try 123 2022-02-18 13:45:47 +03:00
zvonand
6d47a715dc fix decimal overflow 2022-02-18 10:18:07 +03:00
zvonand
90c857c5e3 merge 2022-02-17 18:23:37 +03:00
vdimir
65452ac089
Fix checkOverflow in FunctionDateOrDateTimeAddInterval 2022-02-16 14:30:37 +00:00
zvonand
cf244689a2 fixed filling transform 2022-02-16 15:14:25 +03:00
zvonand
f60a944483 fixed toStartOfInterval 2022-02-16 02:43:08 +03:00
vdimir
a5c34fafd4
Check overflow in addSeconds/Minues/etc functions 2022-02-15 19:04:59 +00:00
zvonand
888542e29b add[interval] no longer oses decimal components
Not only support for better subsecond logic, but also fewer conversions
-> faster operation
2022-02-14 02:52:56 +03:00
zvonand
2454f1dd13 Decimal components attempt 2022-02-14 00:04:09 +03:00
zvonand
48c1b8b62b Updated IntervalParser 2022-02-13 13:01:48 +03:00
zvonand
0c5e8a0beb upload 2022-02-12 19:37:06 +03:00
zvonand
da1ba60202 upload 2022-02-11 13:35:50 +03:00
zvonand
0fe1fdb6ca add[...]Seconds basically work 2022-02-09 20:19:01 +03:00
zvonand
d8b40e7deb basic add[...]seconds added
TODO: fix DT64 scale resolution when input and func's scale are not the
same
2022-02-09 10:28:15 +03:00
zvonand
9456d89fad Move current work from old laptop
skip-checks: true
2022-02-07 21:44:14 +03:00
Amos Bird
0b7a94c2be Saturate date/datetime to zero 2022-01-03 02:07:08 +03:00
Alexey Milovidov
29d28c531f Move code around to avoid dlsym on Musl 2021-12-24 12:25:27 +03:00
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
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
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
4669839fbb add comment and update ya.make 2021-07-11 04:55:42 -07:00
NengLiu
1d7d973dea change addWeeks delta's datatype from Int64 to Int32 2021-07-09 11:42:32 +08:00
NengLiu
e172ca240b change addQuarter delta's datatype from Int64 to Int32 2021-07-09 11:35:12 +08:00
neng.liu
100d30a5ba fix pr comment 2021-07-08 00:06:36 -07:00
neng.liu
ec7604b013 add parquet test and fix add interval error when type is date32 2021-06-28 16:36:54 +08: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