duckdb 0.3.3-dev1088.0 → 0.3.3-dev1096.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
- "version": "0.3.3-dev1088.0",
4
+ "version": "0.3.3-dev1096.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -154840,14 +154840,15 @@ unique_ptr<BoundTableRef> Binder::Bind(BaseTableRef &ref) {
154840
154840
  }
154841
154841
  // not a CTE
154842
154842
  // extract a table or view from the catalog
154843
+ auto &catalog = Catalog::GetCatalog(context);
154843
154844
  auto table_or_view =
154844
- Catalog::GetCatalog(context).GetEntry(context, CatalogType::TABLE_ENTRY, ref.schema_name, ref.table_name,
154845
- ref.schema_name.empty() ? true : false, error_context);
154845
+ catalog.GetEntry(context, CatalogType::TABLE_ENTRY, ref.schema_name, ref.table_name, true, error_context);
154846
154846
  if (!table_or_view) {
154847
+ auto table_name = ref.schema_name.empty() ? ref.table_name : (ref.schema_name + "." + ref.table_name);
154847
154848
  // table could not be found: try to bind a replacement scan
154848
154849
  auto &config = DBConfig::GetConfig(context);
154849
154850
  for (auto &scan : config.replacement_scans) {
154850
- auto replacement_function = scan.function(context, ref.table_name, scan.data.get());
154851
+ auto replacement_function = scan.function(context, table_name, scan.data.get());
154851
154852
  if (replacement_function) {
154852
154853
  replacement_function->alias = ref.alias.empty() ? ref.table_name : ref.alias;
154853
154854
  replacement_function->column_name_alias = ref.column_name_alias;
@@ -154857,11 +154858,11 @@ unique_ptr<BoundTableRef> Binder::Bind(BaseTableRef &ref) {
154857
154858
  // we still didn't find the table
154858
154859
  if (GetBindingMode() == BindingMode::EXTRACT_NAMES) {
154859
154860
  // if we are in EXTRACT_NAMES, we create a dummy table ref
154860
- AddTableName(ref.table_name);
154861
+ AddTableName(table_name);
154861
154862
 
154862
154863
  // add a bind context entry
154863
154864
  auto table_index = GenerateTableIndex();
154864
- auto alias = ref.alias.empty() ? ref.table_name : ref.alias;
154865
+ auto alias = ref.alias.empty() ? table_name : ref.alias;
154865
154866
  vector<LogicalType> types {LogicalType::INTEGER};
154866
154867
  vector<string> names {"__dummy_col" + to_string(table_index)};
154867
154868
  bind_context.AddGenericBinding(table_index, alias, names, types);
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 "f44e77c7e"
15
- #define DUCKDB_VERSION "v0.3.3-dev1088"
14
+ #define DUCKDB_SOURCE_ID "85e70bc3a"
15
+ #define DUCKDB_VERSION "v0.3.3-dev1096"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //