duckdb 0.3.5-dev169.0 → 0.3.5-dev175.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 +36 -12
- package/src/duckdb.hpp +3 -4
- package/src/parquet-amalgamation.cpp +34905 -34905
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -1237,8 +1237,8 @@ namespace duckdb {
|
|
|
1237
1237
|
class TableMacroFunction : public MacroFunction {
|
|
1238
1238
|
public:
|
|
1239
1239
|
TableMacroFunction(unique_ptr<QueryNode> query_node);
|
|
1240
|
-
|
|
1241
1240
|
TableMacroFunction(void);
|
|
1241
|
+
|
|
1242
1242
|
//! The main query node
|
|
1243
1243
|
unique_ptr<QueryNode> query_node;
|
|
1244
1244
|
|
|
@@ -1427,10 +1427,15 @@ public:
|
|
|
1427
1427
|
SchemaCatalogEntry *schema;
|
|
1428
1428
|
|
|
1429
1429
|
DUCKDB_API static unique_ptr<CreateMacroInfo> CreateInternalMacroInfo(DefaultMacro &default_macro);
|
|
1430
|
+
DUCKDB_API static unique_ptr<CreateMacroInfo> CreateInternalTableMacroInfo(DefaultMacro &default_macro);
|
|
1430
1431
|
|
|
1431
1432
|
public:
|
|
1432
1433
|
unique_ptr<CatalogEntry> CreateDefaultEntry(ClientContext &context, const string &entry_name) override;
|
|
1433
1434
|
vector<string> GetDefaultEntries() override;
|
|
1435
|
+
|
|
1436
|
+
private:
|
|
1437
|
+
static unique_ptr<CreateMacroInfo> CreateInternalTableMacroInfo(DefaultMacro &default_macro,
|
|
1438
|
+
unique_ptr<MacroFunction> function);
|
|
1434
1439
|
};
|
|
1435
1440
|
|
|
1436
1441
|
} // namespace duckdb
|
|
@@ -4610,6 +4615,7 @@ void CatalogSet::Scan(const std::function<void(CatalogEntry *)> &callback) {
|
|
|
4610
4615
|
|
|
4611
4616
|
|
|
4612
4617
|
|
|
4618
|
+
|
|
4613
4619
|
namespace duckdb {
|
|
4614
4620
|
|
|
4615
4621
|
static DefaultMacro internal_macros[] = {
|
|
@@ -4735,14 +4741,9 @@ static DefaultMacro internal_macros[] = {
|
|
|
4735
4741
|
{nullptr, nullptr, {nullptr}, nullptr}
|
|
4736
4742
|
};
|
|
4737
4743
|
|
|
4738
|
-
unique_ptr<CreateMacroInfo> DefaultFunctionGenerator::
|
|
4739
|
-
// parse the expression
|
|
4740
|
-
auto expressions = Parser::ParseExpressionList(default_macro.macro);
|
|
4741
|
-
D_ASSERT(expressions.size() == 1);
|
|
4742
|
-
|
|
4743
|
-
auto result = make_unique<ScalarMacroFunction>(move(expressions[0]));
|
|
4744
|
+
unique_ptr<CreateMacroInfo> DefaultFunctionGenerator::CreateInternalTableMacroInfo(DefaultMacro &default_macro, unique_ptr<MacroFunction> function) {
|
|
4744
4745
|
for (idx_t param_idx = 0; default_macro.parameters[param_idx] != nullptr; param_idx++) {
|
|
4745
|
-
|
|
4746
|
+
function->parameters.push_back(
|
|
4746
4747
|
make_unique<ColumnRefExpression>(default_macro.parameters[param_idx]));
|
|
4747
4748
|
}
|
|
4748
4749
|
|
|
@@ -4751,8 +4752,30 @@ unique_ptr<CreateMacroInfo> DefaultFunctionGenerator::CreateInternalMacroInfo(De
|
|
|
4751
4752
|
bind_info->name = default_macro.name;
|
|
4752
4753
|
bind_info->temporary = true;
|
|
4753
4754
|
bind_info->internal = true;
|
|
4754
|
-
bind_info->
|
|
4755
|
+
bind_info->type = function->type == MacroType::TABLE_MACRO ? CatalogType::TABLE_MACRO_ENTRY : CatalogType::MACRO_ENTRY;
|
|
4756
|
+
bind_info->function = move(function);
|
|
4755
4757
|
return bind_info;
|
|
4758
|
+
|
|
4759
|
+
}
|
|
4760
|
+
|
|
4761
|
+
unique_ptr<CreateMacroInfo> DefaultFunctionGenerator::CreateInternalMacroInfo(DefaultMacro &default_macro) {
|
|
4762
|
+
// parse the expression
|
|
4763
|
+
auto expressions = Parser::ParseExpressionList(default_macro.macro);
|
|
4764
|
+
D_ASSERT(expressions.size() == 1);
|
|
4765
|
+
|
|
4766
|
+
auto result = make_unique<ScalarMacroFunction>(move(expressions[0]));
|
|
4767
|
+
return CreateInternalTableMacroInfo(default_macro, move(result));
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
unique_ptr<CreateMacroInfo> DefaultFunctionGenerator::CreateInternalTableMacroInfo(DefaultMacro &default_macro) {
|
|
4771
|
+
Parser parser;
|
|
4772
|
+
parser.ParseQuery(default_macro.macro);
|
|
4773
|
+
D_ASSERT(parser.statements.size() == 1);
|
|
4774
|
+
D_ASSERT(parser.statements[0]->type == StatementType::SELECT_STATEMENT);
|
|
4775
|
+
|
|
4776
|
+
auto &select = (SelectStatement &) *parser.statements[0];
|
|
4777
|
+
auto result = make_unique<TableMacroFunction>(move(select.node));
|
|
4778
|
+
return CreateInternalTableMacroInfo(default_macro, move(result));
|
|
4756
4779
|
}
|
|
4757
4780
|
|
|
4758
4781
|
static unique_ptr<CreateFunctionInfo> GetDefaultFunction(const string &input_schema, const string &input_name) {
|
|
@@ -63569,7 +63592,7 @@ void BufferedCSVReaderOptions::SetDelimiter(const string &input) {
|
|
|
63569
63592
|
this->delimiter = StringUtil::Replace(input, "\\t", "\t");
|
|
63570
63593
|
this->has_delimiter = true;
|
|
63571
63594
|
if (input.empty()) {
|
|
63572
|
-
|
|
63595
|
+
this->delimiter = string("\0", 1);
|
|
63573
63596
|
}
|
|
63574
63597
|
}
|
|
63575
63598
|
|
|
@@ -147892,6 +147915,9 @@ unique_ptr<TableRef> SubqueryRef::Deserialize(FieldReader &reader) {
|
|
|
147892
147915
|
|
|
147893
147916
|
namespace duckdb {
|
|
147894
147917
|
|
|
147918
|
+
TableFunctionRef::TableFunctionRef() : TableRef(TableReferenceType::TABLE_FUNCTION) {
|
|
147919
|
+
}
|
|
147920
|
+
|
|
147895
147921
|
string TableFunctionRef::ToString() const {
|
|
147896
147922
|
return BaseToString(function->ToString(), column_name_alias);
|
|
147897
147923
|
}
|
|
@@ -159599,9 +159625,7 @@ unique_ptr<BoundTableRef> Binder::Bind(TableFunctionRef &ref) {
|
|
|
159599
159625
|
|
|
159600
159626
|
if (func_catalog->type == CatalogType::TABLE_FUNCTION_ENTRY) {
|
|
159601
159627
|
function = (TableFunctionCatalogEntry *)func_catalog;
|
|
159602
|
-
|
|
159603
159628
|
} else if (func_catalog->type == CatalogType::TABLE_MACRO_ENTRY) {
|
|
159604
|
-
|
|
159605
159629
|
auto macro_func = (TableMacroCatalogEntry *)func_catalog;
|
|
159606
159630
|
auto query_node = BindTableMacro(*fexpr, macro_func, 0);
|
|
159607
159631
|
D_ASSERT(query_node);
|
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.5-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "1450f883b"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.5-dev175"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -24010,8 +24010,7 @@ namespace duckdb {
|
|
|
24010
24010
|
//! Represents a Table producing function
|
|
24011
24011
|
class TableFunctionRef : public TableRef {
|
|
24012
24012
|
public:
|
|
24013
|
-
TableFunctionRef()
|
|
24014
|
-
}
|
|
24013
|
+
DUCKDB_API TableFunctionRef();
|
|
24015
24014
|
|
|
24016
24015
|
unique_ptr<ParsedExpression> function;
|
|
24017
24016
|
vector<string> column_name_alias;
|