duckdb 0.3.5-dev584.0 → 0.3.5-dev593.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.5-dev584.0",
4
+ "version": "0.3.5-dev593.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -159855,8 +159855,10 @@ BindResult ExpressionBinder::BindExpression(ComparisonExpression &expr, idx_t de
159855
159855
  // now obtain the result type of the input types
159856
159856
  auto input_type = BoundComparisonExpression::BindComparison(left_sql_type, right_sql_type);
159857
159857
  // add casts (if necessary)
159858
- left.expr = BoundCastExpression::AddCastToType(move(left.expr), input_type);
159859
- right.expr = BoundCastExpression::AddCastToType(move(right.expr), input_type);
159858
+ left.expr = BoundCastExpression::AddCastToType(move(left.expr), input_type, input_type.id() == LogicalTypeId::ENUM);
159859
+ right.expr =
159860
+ BoundCastExpression::AddCastToType(move(right.expr), input_type, input_type.id() == LogicalTypeId::ENUM);
159861
+
159860
159862
  if (input_type.id() == LogicalTypeId::VARCHAR) {
159861
159863
  // handle collation
159862
159864
  auto collation = StringType::GetCollation(input_type);
@@ -166455,7 +166457,8 @@ BoundCastExpression::BoundCastExpression(unique_ptr<Expression> child_p, Logical
166455
166457
  try_cast(try_cast_p) {
166456
166458
  }
166457
166459
 
166458
- unique_ptr<Expression> BoundCastExpression::AddCastToType(unique_ptr<Expression> expr, const LogicalType &target_type) {
166460
+ unique_ptr<Expression> BoundCastExpression::AddCastToType(unique_ptr<Expression> expr, const LogicalType &target_type,
166461
+ bool try_cast) {
166459
166462
  D_ASSERT(expr);
166460
166463
  if (expr->expression_class == ExpressionClass::BOUND_PARAMETER) {
166461
166464
  auto &parameter = (BoundParameterExpression &)*expr;
@@ -166472,7 +166475,7 @@ unique_ptr<Expression> BoundCastExpression::AddCastToType(unique_ptr<Expression>
166472
166475
  return expr;
166473
166476
  }
166474
166477
  }
166475
- return make_unique<BoundCastExpression>(move(expr), target_type);
166478
+ return make_unique<BoundCastExpression>(move(expr), target_type, try_cast);
166476
166479
  }
166477
166480
  return expr;
166478
166481
  }