duckdb 0.5.2-dev660.0 → 0.5.2-dev667.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 +28 -4
- package/src/duckdb.hpp +6 -2
- package/src/parquet-amalgamation.cpp +37439 -37439
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
|
|
|
@@ -189777,6 +189785,22 @@ unique_ptr<LogicalOperator> LogicalOperator::Deserialize(Deserializer &deseriali
|
|
|
189777
189785
|
return result;
|
|
189778
189786
|
}
|
|
189779
189787
|
|
|
189788
|
+
unique_ptr<LogicalOperator> LogicalOperator::Copy(ClientContext &context) const {
|
|
189789
|
+
BufferedSerializer logical_op_serializer;
|
|
189790
|
+
try {
|
|
189791
|
+
this->Serialize(logical_op_serializer);
|
|
189792
|
+
} catch (NotImplementedException &ex) {
|
|
189793
|
+
throw NotImplementedException("Logical Operator Copy requires the logical operator and all of its children to "
|
|
189794
|
+
"be serializable: " +
|
|
189795
|
+
std::string(ex.what()));
|
|
189796
|
+
}
|
|
189797
|
+
auto data = logical_op_serializer.GetData();
|
|
189798
|
+
auto logical_op_deserializer = BufferedDeserializer(data.data.get(), data.size);
|
|
189799
|
+
PlanDeserializationState state(context);
|
|
189800
|
+
auto op_copy = LogicalOperator::Deserialize(logical_op_deserializer, state);
|
|
189801
|
+
return op_copy;
|
|
189802
|
+
}
|
|
189803
|
+
|
|
189780
189804
|
} // namespace duckdb
|
|
189781
189805
|
|
|
189782
189806
|
|
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 "064466a3a"
|
|
15
|
+
#define DUCKDB_VERSION "v0.5.2-dev667"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -10175,6 +10175,8 @@ public:
|
|
|
10175
10175
|
|
|
10176
10176
|
static unique_ptr<LogicalOperator> Deserialize(Deserializer &deserializer, PlanDeserializationState &state);
|
|
10177
10177
|
|
|
10178
|
+
virtual unique_ptr<LogicalOperator> Copy(ClientContext &context) const;
|
|
10179
|
+
|
|
10178
10180
|
virtual bool RequireOptimizer() const {
|
|
10179
10181
|
return true;
|
|
10180
10182
|
}
|
|
@@ -24765,6 +24767,8 @@ public:
|
|
|
24765
24767
|
DUCKDB_API static int64_t Epoch(date_t date);
|
|
24766
24768
|
//! Extract the epoch from the date (nanoseconds since 1970-01-01)
|
|
24767
24769
|
DUCKDB_API static int64_t EpochNanoseconds(date_t date);
|
|
24770
|
+
//! Extract the epoch from the date (microseconds since 1970-01-01)
|
|
24771
|
+
DUCKDB_API static int64_t EpochMicroseconds(date_t date);
|
|
24768
24772
|
//! Convert the epoch (seconds since 1970-01-01) to a date_t
|
|
24769
24773
|
DUCKDB_API static date_t EpochToDate(int64_t epoch);
|
|
24770
24774
|
|