duckdb 0.3.2-dev341.0 → 0.3.2-dev360.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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/src/duckdb.cpp +10161 -9914
  3. package/src/duckdb.hpp +41 -3
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 "32060df04"
14
- #define DUCKDB_VERSION "0.3.2-dev341"
13
+ #define DUCKDB_SOURCE_ID "e6cd30e45"
14
+ #define DUCKDB_VERSION "0.3.2-dev360"
15
15
  //===----------------------------------------------------------------------===//
16
16
  // DuckDB
17
17
  //
@@ -6979,7 +6979,12 @@ enum class OrderByNullType : uint8_t { INVALID = 0, ORDER_DEFAULT = 1, NULLS_FIR
6979
6979
 
6980
6980
  namespace duckdb {
6981
6981
 
6982
- enum ResultModifierType : uint8_t { LIMIT_MODIFIER = 1, ORDER_MODIFIER = 2, DISTINCT_MODIFIER = 3 };
6982
+ enum ResultModifierType : uint8_t {
6983
+ LIMIT_MODIFIER = 1,
6984
+ ORDER_MODIFIER = 2,
6985
+ DISTINCT_MODIFIER = 3,
6986
+ LIMIT_PERCENT_MODIFIER = 4
6987
+ };
6983
6988
 
6984
6989
  //! A ResultModifier
6985
6990
  class ResultModifier {
@@ -7069,6 +7074,23 @@ public:
7069
7074
  static unique_ptr<ResultModifier> Deserialize(Deserializer &source);
7070
7075
  };
7071
7076
 
7077
+ class LimitPercentModifier : public ResultModifier {
7078
+ public:
7079
+ LimitPercentModifier() : ResultModifier(ResultModifierType::LIMIT_PERCENT_MODIFIER) {
7080
+ }
7081
+
7082
+ //! LIMIT %
7083
+ unique_ptr<ParsedExpression> limit;
7084
+ //! OFFSET
7085
+ unique_ptr<ParsedExpression> offset;
7086
+
7087
+ public:
7088
+ bool Equals(const ResultModifier *other) const override;
7089
+ unique_ptr<ResultModifier> Copy() override;
7090
+ void Serialize(Serializer &serializer) override;
7091
+ static unique_ptr<ResultModifier> Deserialize(Deserializer &source);
7092
+ };
7093
+
7072
7094
  } // namespace duckdb
7073
7095
 
7074
7096
  //===----------------------------------------------------------------------===//
@@ -7532,6 +7554,7 @@ enum class LogicalOperatorType : uint8_t {
7532
7554
  LOGICAL_COPY_TO_FILE = 10,
7533
7555
  LOGICAL_DISTINCT = 11,
7534
7556
  LOGICAL_SAMPLE = 12,
7557
+ LOGICAL_LIMIT_PERCENT = 13,
7535
7558
 
7536
7559
  // -----------------------------
7537
7560
  // Data sources
@@ -8023,6 +8046,20 @@ public:
8023
8046
  vector<unique_ptr<Expression>> target_distincts;
8024
8047
  };
8025
8048
 
8049
+ class BoundLimitPercentModifier : public BoundResultModifier {
8050
+ public:
8051
+ BoundLimitPercentModifier() : BoundResultModifier(ResultModifierType::LIMIT_PERCENT_MODIFIER) {
8052
+ }
8053
+ //! LIMIT %
8054
+ double limit_percent = 100.0;
8055
+ //! OFFSET
8056
+ int64_t offset_val = 0;
8057
+ //! Expression in case limit is not constant
8058
+ unique_ptr<Expression> limit;
8059
+ //! Expression in case limit is not constant
8060
+ unique_ptr<Expression> offset;
8061
+ };
8062
+
8026
8063
  } // namespace duckdb
8027
8064
 
8028
8065
 
@@ -12660,6 +12697,7 @@ enum class PhysicalOperatorType : uint8_t {
12660
12697
  INVALID,
12661
12698
  ORDER_BY,
12662
12699
  LIMIT,
12700
+ LIMIT_PERCENT,
12663
12701
  TOP_N,
12664
12702
  WINDOW,
12665
12703
  UNNEST,