duckdb 0.3.1-dev353.0 → 0.3.1-dev381.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.1-dev353.0",
4
+ "version": "0.3.1-dev381.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -42839,7 +42839,16 @@ int64_t EnumType::GetPos(const LogicalType &type, const string &key) {
42839
42839
  const string &EnumType::GetValue(const Value &val) {
42840
42840
  auto info = val.type().AuxInfo();
42841
42841
  vector<string> &values_insert_order = ((EnumTypeInfo &)*info).values_insert_order;
42842
- return values_insert_order[val.value_.utinyint];
42842
+ switch (val.type().InternalType()) {
42843
+ case PhysicalType::UINT8:
42844
+ return values_insert_order[val.value_.utinyint];
42845
+ case PhysicalType::UINT16:
42846
+ return values_insert_order[val.value_.usmallint];
42847
+ case PhysicalType::UINT32:
42848
+ return values_insert_order[val.value_.uinteger];
42849
+ default:
42850
+ throw InternalException("Invalid Internal Type for ENUMs");
42851
+ }
42843
42852
  }
42844
42853
 
42845
42854
  const vector<string> &EnumType::GetValuesInsertOrder(const LogicalType &type) {
@@ -132619,6 +132628,9 @@ unique_ptr<CreateStatement> Transformer::TransformCreateTableAs(duckdb_libpgquer
132619
132628
  throw NotImplementedException("Unimplemented features for CREATE TABLE as");
132620
132629
  }
132621
132630
  auto qname = TransformQualifiedName(stmt->into->rel);
132631
+ if (stmt->query->type != duckdb_libpgquery::T_PGSelectStmt) {
132632
+ throw ParserException("CREATE TABLE AS requires a SELECT clause");
132633
+ }
132622
132634
  auto query = TransformSelect(stmt->query, false);
132623
132635
 
132624
132636
  auto result = make_unique<CreateStatement>();
@@ -133121,6 +133133,9 @@ unique_ptr<SelectStatement> Transformer::TransformSelect(duckdb_libpgquery::PGNo
133121
133133
  namespace duckdb {
133122
133134
 
133123
133135
  unique_ptr<QueryNode> Transformer::TransformSelectNode(duckdb_libpgquery::PGSelectStmt *stmt) {
133136
+ D_ASSERT(stmt->type == duckdb_libpgquery::T_PGSelectStmt);
133137
+ StackCheck();
133138
+
133124
133139
  unique_ptr<QueryNode> node;
133125
133140
 
133126
133141
  switch (stmt->op) {
package/src/duckdb.hpp CHANGED
@@ -10,8 +10,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
10
10
 
11
11
  #pragma once
12
12
  #define DUCKDB_AMALGAMATION 1
13
- #define DUCKDB_SOURCE_ID "b70a22088"
14
- #define DUCKDB_VERSION "0.3.1-dev353"
13
+ #define DUCKDB_SOURCE_ID "120a797d0"
14
+ #define DUCKDB_VERSION "0.3.1-dev381"
15
15
  //===----------------------------------------------------------------------===//
16
16
  // DuckDB
17
17
  //