duckdb 0.5.2-dev660.0 → 0.5.2-dev664.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb.cpp +12 -4
- package/src/duckdb.hpp +4 -2
- package/src/parquet-amalgamation.cpp +37238 -37238
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -43019,6 +43019,7 @@ void DataChunk::Print() {
|
|
|
43019
43019
|
|
|
43020
43020
|
|
|
43021
43021
|
|
|
43022
|
+
|
|
43022
43023
|
#include <cstring>
|
|
43023
43024
|
#include <cctype>
|
|
43024
43025
|
#include <algorithm>
|
|
@@ -43433,6 +43434,14 @@ int64_t Date::EpochNanoseconds(date_t date) {
|
|
|
43433
43434
|
return ((int64_t)date.days) * (Interval::MICROS_PER_DAY * 1000);
|
|
43434
43435
|
}
|
|
43435
43436
|
|
|
43437
|
+
int64_t Date::EpochMicroseconds(date_t date) {
|
|
43438
|
+
int64_t result;
|
|
43439
|
+
if (!TryMultiplyOperator::Operation<int64_t, int64_t, int64_t>(date.days, Interval::MICROS_PER_DAY, result)) {
|
|
43440
|
+
throw ConversionException("Could not convert DATE to microseconds");
|
|
43441
|
+
}
|
|
43442
|
+
return result;
|
|
43443
|
+
}
|
|
43444
|
+
|
|
43436
43445
|
int32_t Date::ExtractYear(date_t d, int32_t *last_year) {
|
|
43437
43446
|
auto n = d.days;
|
|
43438
43447
|
// cached look up: check if year of this date is the same as the last one we looked up
|
|
@@ -98904,16 +98913,15 @@ struct DateDiff {
|
|
|
98904
98913
|
struct MicrosecondsOperator {
|
|
98905
98914
|
template <class TA, class TB, class TR>
|
|
98906
98915
|
static inline TR Operation(TA startdate, TB enddate) {
|
|
98907
|
-
return Date::
|
|
98908
|
-
Date::EpochNanoseconds(startdate) / Interval::NANOS_PER_MICRO;
|
|
98916
|
+
return Date::EpochMicroseconds(enddate) - Date::EpochMicroseconds(startdate);
|
|
98909
98917
|
}
|
|
98910
98918
|
};
|
|
98911
98919
|
|
|
98912
98920
|
struct MillisecondsOperator {
|
|
98913
98921
|
template <class TA, class TB, class TR>
|
|
98914
98922
|
static inline TR Operation(TA startdate, TB enddate) {
|
|
98915
|
-
return Date::
|
|
98916
|
-
Date::
|
|
98923
|
+
return Date::EpochMicroseconds(enddate) / Interval::MICROS_PER_MSEC -
|
|
98924
|
+
Date::EpochMicroseconds(startdate) / Interval::MICROS_PER_MSEC;
|
|
98917
98925
|
}
|
|
98918
98926
|
};
|
|
98919
98927
|
|
package/src/duckdb.hpp
CHANGED
|
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
13
|
#define DUCKDB_AMALGAMATION_EXTENDED 1
|
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
|
15
|
-
#define DUCKDB_VERSION "v0.5.2-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "a22481a18"
|
|
15
|
+
#define DUCKDB_VERSION "v0.5.2-dev664"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -24765,6 +24765,8 @@ public:
|
|
|
24765
24765
|
DUCKDB_API static int64_t Epoch(date_t date);
|
|
24766
24766
|
//! Extract the epoch from the date (nanoseconds since 1970-01-01)
|
|
24767
24767
|
DUCKDB_API static int64_t EpochNanoseconds(date_t date);
|
|
24768
|
+
//! Extract the epoch from the date (microseconds since 1970-01-01)
|
|
24769
|
+
DUCKDB_API static int64_t EpochMicroseconds(date_t date);
|
|
24768
24770
|
//! Convert the epoch (seconds since 1970-01-01) to a date_t
|
|
24769
24771
|
DUCKDB_API static date_t EpochToDate(int64_t epoch);
|
|
24770
24772
|
|