duckdb 0.6.2-dev1226.0 → 0.6.2-dev1234.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
CHANGED
|
@@ -22,12 +22,11 @@ string MacroFunction::ValidateArguments(MacroFunction ¯o_def, const string &
|
|
|
22
22
|
|
|
23
23
|
// separate positional and default arguments
|
|
24
24
|
for (auto &arg : function_expr.children) {
|
|
25
|
-
if (
|
|
26
|
-
!arg->alias.empty()) {
|
|
25
|
+
if (!arg->alias.empty()) {
|
|
27
26
|
// default argument
|
|
28
|
-
if (macro_def.default_parameters.
|
|
27
|
+
if (!macro_def.default_parameters.count(arg->alias)) {
|
|
29
28
|
return StringUtil::Format("Macro %s does not have default parameter %s!", name, arg->alias);
|
|
30
|
-
} else if (defaults.
|
|
29
|
+
} else if (defaults.count(arg->alias)) {
|
|
31
30
|
return StringUtil::Format("Duplicate default parameters %s!", arg->alias);
|
|
32
31
|
}
|
|
33
32
|
defaults[arg->alias] = std::move(arg);
|
|
@@ -57,10 +56,13 @@ string MacroFunction::ValidateArguments(MacroFunction ¯o_def, const string &
|
|
|
57
56
|
return error;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
//
|
|
59
|
+
// Add the default values for parameters that have defaults, that were not explicitly assigned to
|
|
61
60
|
for (auto it = macro_def.default_parameters.begin(); it != macro_def.default_parameters.end(); it++) {
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
auto ¶meter_name = it->first;
|
|
62
|
+
auto ¶meter_default = it->second;
|
|
63
|
+
if (!defaults.count(parameter_name)) {
|
|
64
|
+
// This parameter was not set yet, set it with the default value
|
|
65
|
+
defaults[parameter_name] = parameter_default->Copy();
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
|
2
|
-
#define DUCKDB_VERSION "0.6.2-
|
|
2
|
+
#define DUCKDB_VERSION "0.6.2-dev1234"
|
|
3
3
|
#endif
|
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
|
5
|
+
#define DUCKDB_SOURCE_ID "995942ef30"
|
|
6
6
|
#endif
|
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
|
8
8
|
#include "duckdb/main/database.hpp"
|