| 355 | CsvFileFormat::CsvFileFormat() : FileFormat(std::make_shared<CsvFragmentScanOptions>()) {} |
| 356 | |
| 357 | bool CsvFileFormat::Equals(const FileFormat& format) const { |
| 358 | if (type_name() != format.type_name()) return false; |
| 359 | |
| 360 | const auto& other_parse_options = |
| 361 | checked_cast<const CsvFileFormat&>(format).parse_options; |
| 362 | |
| 363 | return parse_options.delimiter == other_parse_options.delimiter && |
| 364 | parse_options.quoting == other_parse_options.quoting && |
| 365 | parse_options.quote_char == other_parse_options.quote_char && |
| 366 | parse_options.double_quote == other_parse_options.double_quote && |
| 367 | parse_options.escaping == other_parse_options.escaping && |
| 368 | parse_options.escape_char == other_parse_options.escape_char && |
| 369 | parse_options.newlines_in_values == other_parse_options.newlines_in_values && |
| 370 | parse_options.ignore_empty_lines == other_parse_options.ignore_empty_lines; |
| 371 | } |
| 372 | |
| 373 | Result<bool> CsvFileFormat::IsSupported(const FileSource& source) const { |
| 374 | RETURN_NOT_OK(source.Open().status()); |