duckdb 0.3.2-dev788.0 → 0.3.2-dev841.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/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 "6322c0deb"
15
- #define DUCKDB_VERSION "0.3.2-dev788"
14
+ #define DUCKDB_SOURCE_ID "dee46dbe3"
15
+ #define DUCKDB_VERSION "0.3.2-dev841"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //
@@ -19205,8 +19205,8 @@ public:
19205
19205
  //! Fetch a value of the specific row id and append it to the result
19206
19206
  void FetchRow(ColumnFetchState &state, row_t row_id, Vector &result, idx_t result_idx);
19207
19207
 
19208
- static void FilterSelection(SelectionVector &sel, Vector &result, const TableFilter &filter,
19209
- idx_t &approved_tuple_count, ValidityMask &mask);
19208
+ static idx_t FilterSelection(SelectionVector &sel, Vector &result, const TableFilter &filter,
19209
+ idx_t &approved_tuple_count, ValidityMask &mask);
19210
19210
 
19211
19211
  //! Skip a scan forward to the row_index specified in the scan state
19212
19212
  void Skip(ColumnScanState &state);
@@ -20107,27 +20107,40 @@ void NumericStatistics::Update<list_entry_t>(SegmentStatistics &stats, list_entr
20107
20107
 
20108
20108
 
20109
20109
  namespace duckdb {
20110
-
20111
- class ConjunctionOrFilter : public TableFilter {
20110
+ class ConjunctionFilter : public TableFilter {
20112
20111
  public:
20113
- ConjunctionOrFilter();
20112
+ ConjunctionFilter(TableFilterType filter_type_p) : TableFilter(filter_type_p) {
20113
+ }
20114
+
20115
+ virtual ~ConjunctionFilter() {
20116
+ }
20114
20117
 
20115
- //! The filters to OR together
20118
+ //! The filters of this conjunction
20116
20119
  vector<unique_ptr<TableFilter>> child_filters;
20117
20120
 
20121
+ public:
20122
+ virtual FilterPropagateResult CheckStatistics(BaseStatistics &stats) = 0;
20123
+ virtual string ToString(const string &column_name) = 0;
20124
+
20125
+ virtual bool Equals(const TableFilter &other) const {
20126
+ return TableFilter::Equals(other);
20127
+ }
20128
+ };
20129
+
20130
+ class ConjunctionOrFilter : public ConjunctionFilter {
20131
+ public:
20132
+ ConjunctionOrFilter();
20133
+
20118
20134
  public:
20119
20135
  FilterPropagateResult CheckStatistics(BaseStatistics &stats) override;
20120
20136
  string ToString(const string &column_name) override;
20121
20137
  bool Equals(const TableFilter &other) const override;
20122
20138
  };
20123
20139
 
20124
- class ConjunctionAndFilter : public TableFilter {
20140
+ class ConjunctionAndFilter : public ConjunctionFilter {
20125
20141
  public:
20126
20142
  ConjunctionAndFilter();
20127
20143
 
20128
- //! The filters to OR together
20129
- vector<unique_ptr<TableFilter>> child_filters;
20130
-
20131
20144
  public:
20132
20145
  FilterPropagateResult CheckStatistics(BaseStatistics &stats) override;
20133
20146
  string ToString(const string &column_name) override;
@@ -20328,6 +20341,7 @@ protected:
20328
20341
 
20329
20342
  namespace duckdb {
20330
20343
  struct CopyInfo;
20344
+ struct CSVFileHandle;
20331
20345
  struct FileHandle;
20332
20346
  struct StrpTimeFormat;
20333
20347
 
@@ -20428,15 +20442,14 @@ public:
20428
20442
 
20429
20443
  BufferedCSVReader(FileSystem &fs, FileOpener *opener, BufferedCSVReaderOptions options,
20430
20444
  const vector<LogicalType> &requested_types = vector<LogicalType>());
20445
+ ~BufferedCSVReader();
20431
20446
 
20432
20447
  FileSystem &fs;
20433
20448
  FileOpener *opener;
20434
20449
  BufferedCSVReaderOptions options;
20435
20450
  vector<LogicalType> sql_types;
20436
20451
  vector<string> col_names;
20437
- unique_ptr<FileHandle> file_handle;
20438
- bool plain_file_source = false;
20439
- idx_t file_size = 0;
20452
+ unique_ptr<CSVFileHandle> file_handle;
20440
20453
 
20441
20454
  unique_ptr<char[]> buffer;
20442
20455
  idx_t buffer_size;
@@ -20468,6 +20481,8 @@ public:
20468
20481
  //! Extract a single DataChunk from the CSV file and stores it in insert_chunk
20469
20482
  void ParseCSV(DataChunk &insert_chunk);
20470
20483
 
20484
+ idx_t GetFileSize();
20485
+
20471
20486
  private:
20472
20487
  //! Initialize Parser
20473
20488
  void Initialize(const vector<LogicalType> &requested_types);
@@ -20514,7 +20529,7 @@ private:
20514
20529
  //! Reads a new buffer from the CSV file if the current one has been exhausted
20515
20530
  bool ReadBuffer(idx_t &start);
20516
20531
 
20517
- unique_ptr<FileHandle> OpenCSV(const BufferedCSVReaderOptions &options);
20532
+ unique_ptr<CSVFileHandle> OpenCSV(const BufferedCSVReaderOptions &options);
20518
20533
 
20519
20534
  //! First phase of auto detection: detect CSV dialect (i.e. delimiter, quote rules, etc)
20520
20535
  void DetectDialect(const vector<LogicalType> &requested_types, BufferedCSVReaderOptions &original_options,