duckdb 0.3.2-dev952.0 → 0.3.2-dev955.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.2-dev952.0",
4
+ "version": "0.3.2-dev955.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -19364,14 +19364,14 @@ static bool IntegerCastLoop(const char *buf, idx_t len, T &result, bool strict)
19364
19364
  if (pos >= len) {
19365
19365
  return false;
19366
19366
  }
19367
- int64_t exponent = 0;
19367
+ int32_t exponent = 0;
19368
19368
  int negative = buf[pos] == '-';
19369
19369
  if (negative) {
19370
- if (!IntegerCastLoop<int64_t, true, false>(buf + pos, len - pos, exponent, strict)) {
19370
+ if (!IntegerCastLoop<int32_t, true, false>(buf + pos, len - pos, exponent, strict)) {
19371
19371
  return false;
19372
19372
  }
19373
19373
  } else {
19374
- if (!IntegerCastLoop<int64_t, false, false>(buf + pos, len - pos, exponent, strict)) {
19374
+ if (!IntegerCastLoop<int32_t, false, false>(buf + pos, len - pos, exponent, strict)) {
19375
19375
  return false;
19376
19376
  }
19377
19377
  }
@@ -139161,6 +139161,7 @@ void Transformer::AddGroupByExpression(unique_ptr<ParsedExpression> expression,
139161
139161
 
139162
139162
  static void AddCubeSets(const GroupingSet &current_set, vector<GroupingSet> &result_set,
139163
139163
  vector<GroupingSet> &result_sets, idx_t start_idx = 0) {
139164
+ CheckGroupingSetMax(result_sets.size());
139164
139165
  result_sets.push_back(current_set);
139165
139166
  for (idx_t k = start_idx; k < result_set.size(); k++) {
139166
139167
  auto child_set = current_set;
@@ -139383,6 +139384,8 @@ LogicalType Transformer::TransformTypeName(duckdb_libpgquery::PGTypeName *type_n
139383
139384
  if (type_name->type != duckdb_libpgquery::T_PGTypeName) {
139384
139385
  throw ParserException("Expected a type");
139385
139386
  }
139387
+ auto stack_checker = StackCheck();
139388
+
139386
139389
  auto name = (reinterpret_cast<duckdb_libpgquery::PGValue *>(type_name->names->tail->data.ptr_value)->val.str);
139387
139390
  // transform it to the SQL type
139388
139391
  LogicalTypeId base_type = TransformStringToLogicalType(name);
@@ -139511,8 +139514,10 @@ LogicalType Transformer::TransformTypeName(duckdb_libpgquery::PGTypeName *type_n
139511
139514
  }
139512
139515
  if (type_name->arrayBounds) {
139513
139516
  // array bounds: turn the type into a list
139517
+ idx_t extra_stack = 0;
139514
139518
  for (auto cell = type_name->arrayBounds->head; cell != nullptr; cell = cell->next) {
139515
139519
  result_type = LogicalType::LIST(move(result_type));
139520
+ StackCheck(extra_stack++);
139516
139521
  }
139517
139522
  }
139518
139523
  return result_type;
@@ -139748,8 +139753,14 @@ unique_ptr<CopyStatement> Transformer::TransformCopy(duckdb_libpgquery::PGNode *
139748
139753
  auto &info = *result->info;
139749
139754
 
139750
139755
  // get file_path and is_from
139751
- info.file_path = stmt->filename;
139752
139756
  info.is_from = stmt->is_from;
139757
+ if (!stmt->filename) {
139758
+ // stdin/stdout
139759
+ info.file_path = info.is_from ? "/dev/stdin" : "/dev/stdout";
139760
+ } else {
139761
+ // copy to a file
139762
+ info.file_path = stmt->filename;
139763
+ }
139753
139764
  if (StringUtil::EndsWith(info.file_path, ".parquet")) {
139754
139765
  info.format = "parquet";
139755
139766
  } else {
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 "e77e3ab5c"
15
- #define DUCKDB_VERSION "0.3.2-dev952"
14
+ #define DUCKDB_SOURCE_ID "0fead7880"
15
+ #define DUCKDB_VERSION "0.3.2-dev955"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //