duckdb 0.3.3-dev823.0 → 0.3.3-dev841.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 +80 -4
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +31039 -31039
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -90184,17 +90184,75 @@ struct MD5Operator {
|
|
|
90184
90184
|
}
|
|
90185
90185
|
};
|
|
90186
90186
|
|
|
90187
|
+
struct MD5Number128Operator {
|
|
90188
|
+
template <class INPUT_TYPE, class RESULT_TYPE>
|
|
90189
|
+
static RESULT_TYPE Operation(INPUT_TYPE input) {
|
|
90190
|
+
data_t digest[MD5Context::MD5_HASH_LENGTH_BINARY];
|
|
90191
|
+
|
|
90192
|
+
MD5Context context;
|
|
90193
|
+
context.Add(input);
|
|
90194
|
+
context.Finish(digest);
|
|
90195
|
+
return *reinterpret_cast<hugeint_t *>(digest);
|
|
90196
|
+
}
|
|
90197
|
+
};
|
|
90198
|
+
|
|
90199
|
+
template <bool lower>
|
|
90200
|
+
struct MD5Number64Operator {
|
|
90201
|
+
template <class INPUT_TYPE, class RESULT_TYPE>
|
|
90202
|
+
static RESULT_TYPE Operation(INPUT_TYPE input) {
|
|
90203
|
+
data_t digest[MD5Context::MD5_HASH_LENGTH_BINARY];
|
|
90204
|
+
|
|
90205
|
+
MD5Context context;
|
|
90206
|
+
context.Add(input);
|
|
90207
|
+
context.Finish(digest);
|
|
90208
|
+
return *reinterpret_cast<uint64_t *>(&digest[lower ? 8 : 0]);
|
|
90209
|
+
}
|
|
90210
|
+
};
|
|
90211
|
+
|
|
90187
90212
|
static void MD5Function(DataChunk &args, ExpressionState &state, Vector &result) {
|
|
90188
90213
|
auto &input = args.data[0];
|
|
90189
90214
|
|
|
90190
90215
|
UnaryExecutor::ExecuteString<string_t, string_t, MD5Operator>(input, result, args.size());
|
|
90191
90216
|
}
|
|
90192
90217
|
|
|
90218
|
+
static void MD5NumberFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
|
90219
|
+
auto &input = args.data[0];
|
|
90220
|
+
|
|
90221
|
+
UnaryExecutor::Execute<string_t, hugeint_t, MD5Number128Operator>(input, result, args.size());
|
|
90222
|
+
}
|
|
90223
|
+
|
|
90224
|
+
static void MD5NumberUpperFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
|
90225
|
+
auto &input = args.data[0];
|
|
90226
|
+
|
|
90227
|
+
UnaryExecutor::Execute<string_t, uint64_t, MD5Number64Operator<false>>(input, result, args.size());
|
|
90228
|
+
}
|
|
90229
|
+
|
|
90230
|
+
static void MD5NumberLowerFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
|
90231
|
+
auto &input = args.data[0];
|
|
90232
|
+
|
|
90233
|
+
UnaryExecutor::Execute<string_t, uint64_t, MD5Number64Operator<true>>(input, result, args.size());
|
|
90234
|
+
}
|
|
90235
|
+
|
|
90193
90236
|
void MD5Fun::RegisterFunction(BuiltinFunctions &set) {
|
|
90194
90237
|
set.AddFunction(ScalarFunction("md5", // name of the function
|
|
90195
90238
|
{LogicalType::VARCHAR}, // argument list
|
|
90196
90239
|
LogicalType::VARCHAR, // return type
|
|
90197
90240
|
MD5Function)); // pointer to function implementation
|
|
90241
|
+
|
|
90242
|
+
set.AddFunction(ScalarFunction("md5_number", // name of the function
|
|
90243
|
+
{LogicalType::VARCHAR}, // argument list
|
|
90244
|
+
LogicalType::HUGEINT, // return type
|
|
90245
|
+
MD5NumberFunction)); // pointer to function implementation
|
|
90246
|
+
|
|
90247
|
+
set.AddFunction(ScalarFunction("md5_number_upper", // name of the function
|
|
90248
|
+
{LogicalType::VARCHAR}, // argument list
|
|
90249
|
+
LogicalType::UBIGINT, // return type
|
|
90250
|
+
MD5NumberUpperFunction)); // pointer to function implementation
|
|
90251
|
+
|
|
90252
|
+
set.AddFunction(ScalarFunction("md5_number_lower", // name of the function
|
|
90253
|
+
{LogicalType::VARCHAR}, // argument list
|
|
90254
|
+
LogicalType::UBIGINT, // return type
|
|
90255
|
+
MD5NumberLowerFunction)); // pointer to function implementation
|
|
90198
90256
|
}
|
|
90199
90257
|
|
|
90200
90258
|
} // namespace duckdb
|
|
@@ -128146,12 +128204,30 @@ bool Pipeline::GetProgressInternal(ClientContext &context, PhysicalOperator *op,
|
|
|
128146
128204
|
current_percentage = get.function.table_scan_progress(context, get.bind_data.get());
|
|
128147
128205
|
return true;
|
|
128148
128206
|
}
|
|
128149
|
-
|
|
128150
|
-
|
|
128207
|
+
// If the table_scan_progress is not implemented it means we don't support this function yet in the progress
|
|
128208
|
+
// bar
|
|
128151
128209
|
return false;
|
|
128152
128210
|
}
|
|
128153
|
-
|
|
128154
|
-
|
|
128211
|
+
// If it is not a table scan we go down on all children until we reach the leaf operators
|
|
128212
|
+
default: {
|
|
128213
|
+
vector<idx_t> progress;
|
|
128214
|
+
vector<idx_t> cardinality;
|
|
128215
|
+
double total_cardinality = 0;
|
|
128216
|
+
current_percentage = 0;
|
|
128217
|
+
for (auto &op_child : op->children) {
|
|
128218
|
+
double child_percentage = 0;
|
|
128219
|
+
if (!GetProgressInternal(context, op_child.get(), child_percentage)) {
|
|
128220
|
+
return false;
|
|
128221
|
+
}
|
|
128222
|
+
progress.push_back(child_percentage);
|
|
128223
|
+
cardinality.push_back(op_child->estimated_cardinality);
|
|
128224
|
+
total_cardinality += op_child->estimated_cardinality;
|
|
128225
|
+
}
|
|
128226
|
+
for (size_t i = 0; i < progress.size(); i++) {
|
|
128227
|
+
current_percentage += progress[i] * cardinality[i] / total_cardinality;
|
|
128228
|
+
}
|
|
128229
|
+
return true;
|
|
128230
|
+
}
|
|
128155
128231
|
}
|
|
128156
128232
|
}
|
|
128157
128233
|
// LCOV_EXCL_STOP
|
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.3.3-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "e59fa8bce"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.3-dev841"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|