Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::BaseCSVData Struct Reference
Inheritance diagram for duckdb::BaseCSVData:
Collaboration diagram for duckdb::BaseCSVData:

Public Member Functions

void Finalize ()
Public Member Functions inherited from duckdb::TableFunctionData
DUCKDB_API unique_ptr< FunctionData > Copy () const override
DUCKDB_API bool Equals (const FunctionData &other) const override
Public Member Functions inherited from duckdb::FunctionData
virtual DUCKDB_API bool SupportStatementCache () const
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const
template<class TARGET>
TARGET & CastNoConst () const

Public Attributes

CSVReaderOptions options
 The CSV reader options.
idx_t filename_col_idx {}
 Offsets for generated columns.
idx_t hive_partition_col_idx {}
Public Attributes inherited from duckdb::TableFunctionData
vector< idx_t > column_ids

Additional Inherited Members

Static Public Member Functions inherited from duckdb::FunctionData
static DUCKDB_API bool Equals (const FunctionData *left, const FunctionData *right)

Member Function Documentation

◆ Finalize()

void duckdb::BaseCSVData::Finalize ( )
241706 {
241707 auto delimiter_string = options.dialect_options.state_machine_options.delimiter.GetValue();
241708
241709 // quote and delimiter must not be substrings of each other
241710 SubstringDetection(options.dialect_options.state_machine_options.quote.GetValue(), delimiter_string, "QUOTE",
241711 "DELIMITER");
241712
241713 // escape and delimiter must not be substrings of each other
241714 SubstringDetection(options.dialect_options.state_machine_options.escape.GetValue(), delimiter_string, "ESCAPE",
241715 "DELIMITER");
241716
241717 // escape and quote must not be substrings of each other (but can be the same)
241718 if (options.dialect_options.state_machine_options.quote != options.dialect_options.state_machine_options.escape) {
241719 AreOptionsEqual(options.dialect_options.state_machine_options.quote.GetValue(),
241720 options.dialect_options.state_machine_options.escape.GetValue(), "QUOTE", "ESCAPE");
241721 }
241722
241723 // comment and quote must not be substrings of each other
241724 AreOptionsEqual(options.dialect_options.state_machine_options.comment.GetValue(),
241725 options.dialect_options.state_machine_options.quote.GetValue(), "COMMENT", "QUOTE");
241726
241727 // delimiter and comment must not be substrings of each other
241728 SubstringDetection(options.dialect_options.state_machine_options.comment.GetValue(), delimiter_string, "COMMENT",
241729 "DELIMITER");
241730
241731 // quote and delimiter must not be substrings of each other
241732 SubstringDetection(options.thousands_separator, options.decimal_separator, "THOUSANDS", "DECIMAL_SEPARATOR");
241733
241734 // null string and delimiter must not be substrings of each other
241735 for (auto &null_str : options.null_str) {
241736 if (!null_str.empty()) {
241737 StringDetection(options.dialect_options.state_machine_options.delimiter.GetValue(), null_str, "DELIMITER",
241738 "NULL");
241739
241740 // quote and nullstr must not be substrings of each other
241741 SubstringDetection(options.dialect_options.state_machine_options.quote.GetValue(), null_str, "QUOTE",
241742 "NULL");
241743
241744 // Validate the nullstr against the escape character
241745 const char escape = options.dialect_options.state_machine_options.escape.GetValue();
241746 // Allow nullstr to be escape character + some non-special character, e.g., "\N" (MySQL default).
241747 // In this case, only unquoted occurrences of the nullstr will be recognized as null values.
241748 if (options.dialect_options.state_machine_options.strict_mode == false && null_str.size() == 2 &&
241749 null_str[0] == escape && null_str[1] != '\0') {
241750 continue;
241751 }
241752 SubstringDetection(escape, null_str, "ESCAPE", "NULL");
241753 }
241754 }
241755
241756 if (!options.prefix.empty() || !options.suffix.empty()) {
241757 if (options.prefix.empty() || options.suffix.empty()) {
241758 throw BinderException("COPY ... (FORMAT CSV) must have both PREFIX and SUFFIX, or none at all");
241759 }
241760 if (options.dialect_options.header.GetValue()) {
241761 throw BinderException("COPY ... (FORMAT CSV)'s HEADER cannot be combined with PREFIX/SUFFIX");
241762 }
241763 }
241764}
CSVReaderOptions options
The CSV reader options.
Definition duckdb.cpp:166604

Member Data Documentation

◆ filename_col_idx

idx_t duckdb::BaseCSVData::filename_col_idx {}

Offsets for generated columns.

166606{};

◆ hive_partition_col_idx

idx_t duckdb::BaseCSVData::hive_partition_col_idx {}
166607{};

The documentation for this struct was generated from the following file: