| 367 | CsvFileFormat::CsvFileFormat() : FileFormat(std::make_shared<CsvFragmentScanOptions>()) {} |
| 368 | |
| 369 | bool CsvFileFormat::Equals(const FileFormat& format) const { |
| 370 | if (type_name() != format.type_name()) return false; |
| 371 | |
| 372 | const auto& other_parse_options = |
| 373 | checked_cast<const CsvFileFormat&>(format).parse_options; |
| 374 | |
| 375 | return parse_options.delimiter == other_parse_options.delimiter && |
| 376 | parse_options.quoting == other_parse_options.quoting && |
| 377 | parse_options.quote_char == other_parse_options.quote_char && |
| 378 | parse_options.double_quote == other_parse_options.double_quote && |
| 379 | parse_options.escaping == other_parse_options.escaping && |
| 380 | parse_options.escape_char == other_parse_options.escape_char && |
| 381 | parse_options.newlines_in_values == other_parse_options.newlines_in_values && |
| 382 | parse_options.ignore_empty_lines == other_parse_options.ignore_empty_lines && |
| 383 | parse_options.pad_short_rows == other_parse_options.pad_short_rows && |
| 384 | parse_options.ignore_extra_columns == other_parse_options.ignore_extra_columns; |
| 385 | } |
| 386 | |
| 387 | Result<bool> CsvFileFormat::IsSupported(const FileSource& source) const { |
| 388 | RETURN_NOT_OK(source.Open().status()); |