Skip to content

Commit 90b0f7e

Browse files
Merge pull request #80700 from ClickHouse/revert-time
Revert "Merge pull request #75735 from yariks5s/time/time64_v2"
2 parents 7a763c1 + 180c764 commit 90b0f7e

File tree

111 files changed

+148
-5706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+148
-5706
lines changed

base/base/Decimal.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace DB
1010
{
1111
template <class> struct Decimal;
1212
class DateTime64;
13-
class Time64;
1413

1514
#define FOR_EACH_UNDERLYING_DECIMAL_TYPE(M) \
1615
M(Int32) \
@@ -143,16 +142,6 @@ class DateTime64 : public Decimal64
143142

144143
constexpr DateTime64(const Base & v): Base(v) {} // NOLINT(google-explicit-constructor)
145144
};
146-
147-
class Time64 : public Decimal64
148-
{
149-
public:
150-
using Base = Decimal64;
151-
using Base::Base;
152-
using NativeType = Base::NativeType;
153-
154-
constexpr Time64(const Base & v): Base(v) {} // NOLINT(google-explicit-constructor)
155-
};
156145
}
157146

158147
constexpr UInt64 max_uint_mask = std::numeric_limits<UInt64>::max();
@@ -184,15 +173,6 @@ namespace std
184173
}
185174
};
186175

187-
template <>
188-
struct hash<DB::Time64>
189-
{
190-
size_t operator()(const DB::Time64 & x) const
191-
{
192-
return std::hash<DB::Time64::NativeType>()(x);
193-
}
194-
};
195-
196176
template <>
197177
struct hash<DB::Decimal256>
198178
{

base/base/Decimal_fwd.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,14 @@ using Decimal128 = Decimal<Int128>;
2727
using Decimal256 = Decimal<Int256>;
2828

2929
class DateTime64;
30-
class Time64;
3130

3231
template <class T>
3332
concept is_decimal =
3433
std::is_same_v<T, Decimal32>
3534
|| std::is_same_v<T, Decimal64>
3635
|| std::is_same_v<T, Decimal128>
3736
|| std::is_same_v<T, Decimal256>
38-
|| std::is_same_v<T, DateTime64>
39-
|| std::is_same_v<T, Time64>;
37+
|| std::is_same_v<T, DateTime64>;
4038

4139
template <class T>
4240
concept is_over_big_int =

base/base/TypeName.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ TN_MAP(Decimal64)
4444
TN_MAP(Decimal128)
4545
TN_MAP(Decimal256)
4646
TN_MAP(DateTime64)
47-
TN_MAP(Time64)
4847
TN_MAP(Array)
4948
TN_MAP(Tuple)
5049
TN_MAP(Map)

base/base/extended_types.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ template <typename T> concept is_floating_point =
7474
M(DataTypeDate) \
7575
M(DataTypeDate32) \
7676
M(DataTypeDateTime) \
77-
M(DataTypeTime) \
7877
M(DataTypeInt8) \
7978
M(DataTypeUInt8) \
8079
M(DataTypeInt16) \
@@ -95,7 +94,6 @@ template <typename T> concept is_floating_point =
9594
M(DataTypeDate, X) \
9695
M(DataTypeDate32, X) \
9796
M(DataTypeDateTime, X) \
98-
M(DataTypeTime, X) \
9997
M(DataTypeInt8, X) \
10098
M(DataTypeUInt8, X) \
10199
M(DataTypeInt16, X) \

ci/jobs/scripts/check_style/aspell-ignore/en/aspell-dict.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3062,7 +3062,6 @@ toStartOfYear
30623062
toString
30633063
toStringCutToZero
30643064
toTime
3065-
toTimeWithFixedDate
30663065
toTimeZone
30673066
toType
30683067
toTypeName

docs/en/sql-reference/data-types/datetime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Resolution: 1 second.
2323

2424
## Speed {#speed}
2525

26-
The `Date` data type is faster than `DateTime` under _most_ conditions.
26+
The `Date` datatype is faster than `DateTime` under _most_ conditions.
2727

2828
The `Date` type requires 2 bytes of storage, while `DateTime` requires 4. However, when the database compresses the database, this difference is amplified. This amplification is due to the minutes and seconds in `DateTime` being less compressible. Filtering and aggregating `Date` instead of `DateTime` is also faster.
2929

docs/en/sql-reference/data-types/time.md

Lines changed: 0 additions & 112 deletions
This file was deleted.

docs/en/sql-reference/data-types/time64.md

Lines changed: 0 additions & 110 deletions
This file was deleted.

docs/en/sql-reference/functions/date-time-functions.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,18 +1644,16 @@ Result:
16441644
**See Also**
16451645
- [date_trunc](#date_trunc)
16461646

1647-
## toTimeWithFixedDate {#totimewithfixeddate}
1647+
## toTime {#totime}
16481648

16491649
Converts a date with time to a certain fixed date, while preserving the time.
16501650

16511651
**Syntax**
16521652

16531653
```sql
1654-
toTimeWithFixedDate(date[,timezone])
1654+
toTime(date[,timezone])
16551655
```
16561656

1657-
Alias: `toTime` - can be used only when the `use_legacy_to_time` setting is enabled.
1658-
16591657
**Arguments**
16601658

16611659
- `date` — Date to convert to a time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).

src/Columns/ColumnDecimal.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,5 @@ template class ColumnDecimal<Decimal64>;
533533
template class ColumnDecimal<Decimal128>;
534534
template class ColumnDecimal<Decimal256>;
535535
template class ColumnDecimal<DateTime64>;
536-
template class ColumnDecimal<Time64>;
537536

538537
}

0 commit comments

Comments
 (0)