duckdb 0.8.2-dev1791.0 → 0.8.2-dev1862.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 (48) hide show
  1. package/binding.gyp +1 -0
  2. package/package.json +1 -1
  3. package/src/duckdb/src/common/constants.cpp +2 -1
  4. package/src/duckdb/src/common/enum_util.cpp +5 -5
  5. package/src/duckdb/src/core_functions/function_list.cpp +2 -0
  6. package/src/duckdb/src/core_functions/scalar/debug/vector_type.cpp +23 -0
  7. package/src/duckdb/src/execution/index/art/art.cpp +49 -108
  8. package/src/duckdb/src/execution/index/art/art_key.cpp +0 -11
  9. package/src/duckdb/src/execution/index/art/fixed_size_allocator.cpp +10 -14
  10. package/src/duckdb/src/execution/index/art/iterator.cpp +13 -19
  11. package/src/duckdb/src/execution/index/art/leaf.cpp +290 -241
  12. package/src/duckdb/src/execution/index/art/node.cpp +104 -95
  13. package/src/duckdb/src/execution/index/art/node16.cpp +6 -6
  14. package/src/duckdb/src/execution/index/art/node256.cpp +6 -6
  15. package/src/duckdb/src/execution/index/art/node4.cpp +6 -6
  16. package/src/duckdb/src/execution/index/art/node48.cpp +6 -6
  17. package/src/duckdb/src/execution/index/art/prefix.cpp +49 -39
  18. package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +34 -1175
  19. package/src/duckdb/src/execution/operator/schema/physical_create_index.cpp +4 -14
  20. package/src/duckdb/src/execution/window_executor.cpp +1280 -0
  21. package/src/duckdb/src/execution/window_segment_tree.cpp +224 -117
  22. package/src/duckdb/src/function/table/read_csv.cpp +4 -3
  23. package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
  24. package/src/duckdb/src/include/duckdb/common/constants.hpp +2 -0
  25. package/src/duckdb/src/include/duckdb/common/type_util.hpp +8 -0
  26. package/src/duckdb/src/include/duckdb/common/typedefs.hpp +8 -0
  27. package/src/duckdb/src/include/duckdb/core_functions/scalar/debug_functions.hpp +27 -0
  28. package/src/duckdb/src/include/duckdb/execution/index/art/art.hpp +1 -1
  29. package/src/duckdb/src/include/duckdb/execution/index/art/art_key.hpp +0 -1
  30. package/src/duckdb/src/include/duckdb/execution/index/art/fixed_size_allocator.hpp +22 -24
  31. package/src/duckdb/src/include/duckdb/execution/index/art/iterator.hpp +2 -2
  32. package/src/duckdb/src/include/duckdb/execution/index/art/leaf.hpp +43 -40
  33. package/src/duckdb/src/include/duckdb/execution/index/art/node.hpp +119 -40
  34. package/src/duckdb/src/include/duckdb/execution/index/art/node16.hpp +1 -0
  35. package/src/duckdb/src/include/duckdb/execution/index/art/node256.hpp +1 -0
  36. package/src/duckdb/src/include/duckdb/execution/index/art/node4.hpp +1 -0
  37. package/src/duckdb/src/include/duckdb/execution/index/art/node48.hpp +1 -0
  38. package/src/duckdb/src/include/duckdb/execution/index/art/prefix.hpp +4 -2
  39. package/src/duckdb/src/include/duckdb/execution/window_executor.hpp +313 -0
  40. package/src/duckdb/src/include/duckdb/execution/window_segment_tree.hpp +60 -53
  41. package/src/duckdb/src/storage/compression/rle.cpp +52 -12
  42. package/src/duckdb/ub_src_core_functions_scalar_debug.cpp +2 -0
  43. package/src/duckdb/ub_src_execution.cpp +2 -0
  44. package/src/duckdb/ub_src_execution_index_art.cpp +0 -4
  45. package/src/duckdb/src/execution/index/art/leaf_segment.cpp +0 -52
  46. package/src/duckdb/src/execution/index/art/swizzleable_pointer.cpp +0 -22
  47. package/src/duckdb/src/include/duckdb/execution/index/art/leaf_segment.hpp +0 -38
  48. package/src/duckdb/src/include/duckdb/execution/index/art/swizzleable_pointer.hpp +0 -58
@@ -1,22 +0,0 @@
1
- #include "duckdb/execution/index/art/swizzleable_pointer.hpp"
2
-
3
- #include "duckdb/storage/meta_block_reader.hpp"
4
-
5
- namespace duckdb {
6
-
7
- SwizzleablePointer::SwizzleablePointer(MetaBlockReader &reader) {
8
-
9
- idx_t block_id = reader.Read<block_id_t>();
10
- offset = reader.Read<uint32_t>();
11
- type = 0;
12
-
13
- if (block_id == DConstants::INVALID_INDEX) {
14
- swizzle_flag = 0;
15
- return;
16
- }
17
-
18
- buffer_id = (uint32_t)block_id;
19
- swizzle_flag = 1;
20
- }
21
-
22
- } // namespace duckdb
@@ -1,38 +0,0 @@
1
- //===----------------------------------------------------------------------===//
2
- // DuckDB
3
- //
4
- // duckdb/execution/index/art/leaf_segment.hpp
5
- //
6
- //
7
- //===----------------------------------------------------------------------===//
8
- #pragma once
9
-
10
- #include "duckdb/execution/index/art/art.hpp"
11
- #include "duckdb/execution/index/art/node.hpp"
12
-
13
- namespace duckdb {
14
-
15
- class LeafSegment {
16
- public:
17
- //! The row IDs stored in this segment
18
- row_t row_ids[Node::LEAF_SEGMENT_SIZE];
19
- //! The pointer of the next segment, if the row IDs exceeds this segment
20
- Node next;
21
-
22
- public:
23
- //! Get a new leaf segment node, might cause a new buffer allocation, and initialize it
24
- static LeafSegment &New(ART &art, Node &node);
25
- //! Get a reference to the leaf segment
26
- static inline LeafSegment &Get(const ART &art, const Node ptr) {
27
- return *Node::GetAllocator(art, NType::LEAF_SEGMENT).Get<LeafSegment>(ptr);
28
- }
29
- //! Free the leaf segment and any subsequent ones
30
- static void Free(ART &art, Node &node);
31
-
32
- //! Append a row ID to the current segment, or create a new segment containing that row ID
33
- LeafSegment &Append(ART &art, uint32_t &count, const row_t row_id);
34
- //! Get the tail of a list of segments
35
- LeafSegment &GetTail(const ART &art);
36
- };
37
-
38
- } // namespace duckdb
@@ -1,58 +0,0 @@
1
- //===----------------------------------------------------------------------===//
2
- // DuckDB
3
- //
4
- // duckdb/execution/index/art/swizzleable_pointer.hpp
5
- //
6
- //
7
- //===----------------------------------------------------------------------===//
8
- #pragma once
9
-
10
- #include "duckdb/common/constants.hpp"
11
-
12
- namespace duckdb {
13
-
14
- // classes
15
- class MetaBlockReader;
16
-
17
- // structs
18
- struct BlockPointer;
19
-
20
- //! SwizzleablePointer provides functions on a (possibly) swizzled pointer. If the swizzle flag is set, then the
21
- //! pointer points to a storage address (and has no type), otherwise the pointer has a type and stores
22
- //! other information (e.g., a buffer location)
23
- class SwizzleablePointer {
24
- public:
25
- //! Constructs an empty SwizzleablePointer
26
- SwizzleablePointer() : swizzle_flag(0), type(0), offset(0), buffer_id(0) {};
27
- //! Constructs a swizzled pointer from a buffer ID and an offset
28
- explicit SwizzleablePointer(MetaBlockReader &reader);
29
- //! Constructs a non-swizzled pointer from a buffer ID and an offset
30
- SwizzleablePointer(uint32_t offset, uint32_t buffer_id)
31
- : swizzle_flag(0), type(0), offset(offset), buffer_id(buffer_id) {};
32
-
33
- //! The swizzle flag, set if swizzled, not set otherwise
34
- uint8_t swizzle_flag : 1;
35
- //! The type of the pointer, zero if not set
36
- uint8_t type : 7;
37
- //! The offset of a memory location
38
- uint32_t offset : 24;
39
- //! The buffer ID of a memory location
40
- uint32_t buffer_id : 32;
41
-
42
- public:
43
- //! Checks if the pointer is swizzled
44
- inline bool IsSwizzled() const {
45
- return swizzle_flag;
46
- }
47
- //! Returns true, if neither the swizzle flag nor the type is set, and false otherwise
48
- inline bool IsSet() const {
49
- return swizzle_flag || type;
50
- }
51
- //! Reset the pointer
52
- inline void Reset() {
53
- swizzle_flag = 0;
54
- type = 0;
55
- }
56
- };
57
-
58
- } // namespace duckdb