duckdb 0.5.2-dev1092.0 → 0.5.2-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
@@ -2,7 +2,7 @@
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
4
  "types": "./lib/duckdb.d.ts",
5
- "version": "0.5.2-dev1092.0",
5
+ "version": "0.5.2-dev1096.0",
6
6
  "description": "DuckDB node.js API",
7
7
  "gypfile": true,
8
8
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -114079,12 +114079,11 @@ static idx_t LevenshteinDistance(const string_t &txt, const string_t &tgt) {
114079
114079
  auto txt_len = txt.GetSize();
114080
114080
  auto tgt_len = tgt.GetSize();
114081
114081
 
114082
- if (txt_len < 1) {
114083
- throw InvalidInputException("Levenshtein Function: 1st argument too short");
114084
- }
114085
-
114086
- if (tgt_len < 1) {
114087
- throw InvalidInputException("Levenshtein Function: 2nd argument too short");
114082
+ // If one string is empty, the distance equals the length of the other string
114083
+ if (txt_len == 0) {
114084
+ return tgt_len;
114085
+ } else if (tgt_len == 0) {
114086
+ return txt_len;
114088
114087
  }
114089
114088
 
114090
114089
  auto txt_str = txt.GetDataUnsafe();
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 "0060a0f5a"
15
- #define DUCKDB_VERSION "v0.5.2-dev1092"
14
+ #define DUCKDB_SOURCE_ID "efa7dfa64"
15
+ #define DUCKDB_VERSION "v0.5.2-dev1096"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //