Create an append-only writer for non-PK tables.
(&self, partition_path: String, bucket: i32)
| 589 | |
| 590 | /// Create an append-only writer for non-PK tables. |
| 591 | fn create_append_writer(&self, partition_path: String, bucket: i32) -> Result<FileWriter> { |
| 592 | if self.has_blob_fields { |
| 593 | let fields = self.table.schema().fields(); |
| 594 | let input_schema = build_target_arrow_schema(fields)?; |
| 595 | Ok(FileWriter::AppendBlob(AppendBlobFileWriter::new( |
| 596 | self.table.file_io().clone(), |
| 597 | self.table.location().to_string(), |
| 598 | partition_path, |
| 599 | bucket, |
| 600 | self.schema_id, |
| 601 | self.target_file_size, |
| 602 | self.blob_target_file_size, |
| 603 | self.file_compression.clone(), |
| 604 | self.file_compression_zstd_level, |
| 605 | self.write_buffer_size, |
| 606 | self.file_format.clone(), |
| 607 | &input_schema, |
| 608 | fields, |
| 609 | &self.blob_descriptor_fields, |
| 610 | ))) |
| 611 | } else { |
| 612 | Ok(FileWriter::Append(DataFileWriter::new( |
| 613 | self.table.file_io().clone(), |
| 614 | self.table.location().to_string(), |
| 615 | partition_path, |
| 616 | bucket, |
| 617 | self.schema_id, |
| 618 | self.target_file_size, |
| 619 | self.file_compression.clone(), |
| 620 | self.file_compression_zstd_level, |
| 621 | self.write_buffer_size, |
| 622 | self.file_format.clone(), |
| 623 | Some(0), |
| 624 | None, |
| 625 | None, |
| 626 | ))) |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | /// Create a postpone writer (KV format, no sorting/dedup, special file naming). |
| 631 | fn create_postpone_writer(&self, partition_path: String, bucket: i32) -> FileWriter { |
no test coverage detected