duckdb 0.3.2-dev1306.0 → 0.3.2-dev1318.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 +23 -11
- package/src/duckdb.hpp +478 -478
- package/src/parquet-amalgamation.cpp +36737 -36737
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -3101,7 +3101,15 @@ string TableCatalogEntry::ToSQL() {
|
|
|
3101
3101
|
ss << ", ";
|
|
3102
3102
|
}
|
|
3103
3103
|
auto &column = columns[i];
|
|
3104
|
-
ss << KeywordHelper::WriteOptionallyQuoted(column.name) << " "
|
|
3104
|
+
ss << KeywordHelper::WriteOptionallyQuoted(column.name) << " ";
|
|
3105
|
+
switch (column.type.id()) {
|
|
3106
|
+
case LogicalTypeId::ENUM:
|
|
3107
|
+
ss << KeywordHelper::WriteOptionallyQuoted(column.type.ToString());
|
|
3108
|
+
break;
|
|
3109
|
+
default:
|
|
3110
|
+
ss << column.type.ToString();
|
|
3111
|
+
break;
|
|
3112
|
+
}
|
|
3105
3113
|
bool not_null = not_null_columns.find(column.oid) != not_null_columns.end();
|
|
3106
3114
|
bool is_single_key_pk = pk_columns.find(column.oid) != pk_columns.end();
|
|
3107
3115
|
bool is_multi_key_pk = multi_key_pks.find(column.name) != multi_key_pks.end();
|
|
@@ -3209,6 +3217,7 @@ TableFunctionCatalogEntry::TableFunctionCatalogEntry(Catalog *catalog, SchemaCat
|
|
|
3209
3217
|
|
|
3210
3218
|
|
|
3211
3219
|
|
|
3220
|
+
|
|
3212
3221
|
#include <algorithm>
|
|
3213
3222
|
#include <sstream>
|
|
3214
3223
|
|
|
@@ -3245,7 +3254,7 @@ string TypeCatalogEntry::ToSQL() {
|
|
|
3245
3254
|
Vector values_insert_order(EnumType::GetValuesInsertOrder(user_type));
|
|
3246
3255
|
idx_t size = EnumType::GetSize(user_type);
|
|
3247
3256
|
ss << "CREATE TYPE ";
|
|
3248
|
-
ss << name;
|
|
3257
|
+
ss << KeywordHelper::WriteOptionallyQuoted(name);
|
|
3249
3258
|
ss << " AS ENUM ( ";
|
|
3250
3259
|
|
|
3251
3260
|
for (idx_t i = 0; i < size; i++) {
|
|
@@ -49343,7 +49352,6 @@ SinkResultType PhysicalSimpleAggregate::Sink(ExecutionContext &context, GlobalSi
|
|
|
49343
49352
|
|
|
49344
49353
|
DataChunk &payload_chunk = sink.payload_chunk;
|
|
49345
49354
|
sink.child_executor.SetChunk(input);
|
|
49346
|
-
payload_chunk.SetCardinality(input);
|
|
49347
49355
|
for (idx_t aggr_idx = 0; aggr_idx < aggregates.size(); aggr_idx++) {
|
|
49348
49356
|
DataChunk filtered_input;
|
|
49349
49357
|
auto &aggregate = (BoundAggregateExpression &)*aggregates[aggr_idx];
|
|
@@ -49358,6 +49366,8 @@ SinkResultType PhysicalSimpleAggregate::Sink(ExecutionContext &context, GlobalSi
|
|
|
49358
49366
|
filtered_input.Slice(input, true_sel, count);
|
|
49359
49367
|
sink.child_executor.SetChunk(filtered_input);
|
|
49360
49368
|
payload_chunk.SetCardinality(count);
|
|
49369
|
+
} else {
|
|
49370
|
+
payload_chunk.SetCardinality(input);
|
|
49361
49371
|
}
|
|
49362
49372
|
// resolve the child expressions of the aggregate (if any)
|
|
49363
49373
|
if (!aggregate.children.empty()) {
|
|
@@ -57313,11 +57323,11 @@ void BufferedCSVReader::InitParseChunk(idx_t num_cols) {
|
|
|
57313
57323
|
void BufferedCSVReader::JumpToBeginning(idx_t skip_rows = 0, bool skip_header = false) {
|
|
57314
57324
|
ResetBuffer();
|
|
57315
57325
|
ResetStream();
|
|
57316
|
-
SkipRowsAndReadHeader(skip_rows, skip_header);
|
|
57317
57326
|
sample_chunk_idx = 0;
|
|
57318
57327
|
bytes_in_chunk = 0;
|
|
57319
57328
|
end_of_file_reached = false;
|
|
57320
57329
|
bom_checked = false;
|
|
57330
|
+
SkipRowsAndReadHeader(skip_rows, skip_header);
|
|
57321
57331
|
}
|
|
57322
57332
|
|
|
57323
57333
|
void BufferedCSVReader::SkipRowsAndReadHeader(idx_t skip_rows, bool skip_header) {
|
|
@@ -80656,17 +80666,11 @@ static void ArraySliceFunction(DataChunk &args, ExpressionState &state, Vector &
|
|
|
80656
80666
|
D_ASSERT(args.data.size() == 3);
|
|
80657
80667
|
auto count = args.size();
|
|
80658
80668
|
|
|
80659
|
-
result.SetVectorType(VectorType::CONSTANT_VECTOR);
|
|
80660
|
-
for (idx_t i = 0; i < args.ColumnCount(); i++) {
|
|
80661
|
-
if (args.data[i].GetVectorType() != VectorType::CONSTANT_VECTOR) {
|
|
80662
|
-
result.SetVectorType(VectorType::FLAT_VECTOR);
|
|
80663
|
-
}
|
|
80664
|
-
}
|
|
80665
|
-
|
|
80666
80669
|
Vector &s = args.data[0];
|
|
80667
80670
|
Vector &b = args.data[1];
|
|
80668
80671
|
Vector &e = args.data[2];
|
|
80669
80672
|
|
|
80673
|
+
s.Normalify(count);
|
|
80670
80674
|
switch (result.GetType().id()) {
|
|
80671
80675
|
case LogicalTypeId::LIST:
|
|
80672
80676
|
// Share the value dictionary as we are just going to slice it
|
|
@@ -80679,6 +80683,14 @@ static void ArraySliceFunction(DataChunk &args, ExpressionState &state, Vector &
|
|
|
80679
80683
|
default:
|
|
80680
80684
|
throw NotImplementedException("Specifier type not implemented");
|
|
80681
80685
|
}
|
|
80686
|
+
|
|
80687
|
+
result.SetVectorType(VectorType::CONSTANT_VECTOR);
|
|
80688
|
+
for (idx_t i = 0; i < args.ColumnCount(); i++) {
|
|
80689
|
+
if (args.data[i].GetVectorType() != VectorType::CONSTANT_VECTOR) {
|
|
80690
|
+
result.SetVectorType(VectorType::FLAT_VECTOR);
|
|
80691
|
+
break;
|
|
80692
|
+
}
|
|
80693
|
+
}
|
|
80682
80694
|
}
|
|
80683
80695
|
|
|
80684
80696
|
static unique_ptr<FunctionData> ArraySliceBind(ClientContext &context, ScalarFunction &bound_function,
|