Use arrow as intermediate type representation#797
Conversation
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
There was a problem hiding this comment.
This is probably a bad merge conflict
There was a problem hiding this comment.
Same here, probably merge conflict issue
| Ok(()) | ||
| } | ||
|
|
||
| #[allow(dead_code)] |
There was a problem hiding this comment.
merge conflict issue ?
| /// Converts destination-facing Arrow CDC batches back to DuckLake row | ||
| /// events. | ||
| async fn stream_batches_to_events(&self, batches: Vec<StreamBatch>) -> EtlResult<Vec<Event>> { | ||
| let mut events = Vec::new(); |
There was a problem hiding this comment.
I think we can set a default capacity here
There was a problem hiding this comment.
Why does it need to have pub structs and so one now ?
| /// Shutdown requested. | ||
| /// | ||
| /// No new WAL is accepted, but buffered or in-flight destination work is | ||
| /// still allowed to drain. | ||
| DrainingForShutdown, |
| /// Cleanup is considered only after status updates, because those are natural | ||
| /// progress points where durable ETL progress may have advanced. The next | ||
| /// deadline is scheduled when the previous cleanup task finishes. | ||
| const SCHEMA_CLEANUP_INTERVAL: Duration = Duration::from_hours(1); |
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
| counter!(ETL_BYTES_PROCESSED_TOTAL, EVENT_TYPE_LABEL => "copy") | ||
| .increment(row_size_bytes); | ||
| counter!( | ||
| ETL_BYTES_PROCESSED_TOTAL, | ||
| PIPELINE_ID_LABEL => this.pipeline_id.to_string(), | ||
| EVENT_TYPE_LABEL => "copy" | ||
| ) | ||
| .increment(row_size_bytes); | ||
|
|
||
| histogram!(ETL_ROW_SIZE_BYTES, EVENT_TYPE_LABEL => "copy") | ||
| .record(row_size_bytes as f64); | ||
| histogram!( | ||
| ETL_ROW_SIZE_BYTES, | ||
| PIPELINE_ID_LABEL => this.pipeline_id.to_string(), | ||
| EVENT_TYPE_LABEL => "copy" | ||
| ) | ||
| .record(row_size_bytes as f64); |
There was a problem hiding this comment.
I don't think this is required because #652
| replicated_table_schema: ReplicatedTableSchema, | ||
| table_schema: Arc<TableSchema>, |
There was a problem hiding this comment.
I'm suspicious about this.
| histogram!(ETL_PARALLEL_TABLE_COPY_TIME_IMBALANCE).record(time_lif); | ||
| histogram!( | ||
| ETL_PARALLEL_TABLE_COPY_TIME_IMBALANCE, | ||
| PIPELINE_ID_LABEL => pipeline_id.to_string(), |
There was a problem hiding this comment.
Should not be required here because we add it before as a global label when starting replicator
| histogram!(ETL_PARALLEL_TABLE_COPY_ROWS_IMBALANCE).record(rows_lif); | ||
| histogram!( | ||
| ETL_PARALLEL_TABLE_COPY_ROWS_IMBALANCE, | ||
| PIPELINE_ID_LABEL => pipeline_id.to_string(), |
There was a problem hiding this comment.
Should not be required here because we add it before as a global label when starting replicator
|
|
||
| histogram!( | ||
| ETL_TABLE_COPY_ROWS, | ||
| PIPELINE_ID_LABEL => pipeline_id.to_string(), |
| histogram!( | ||
| ETL_TABLE_COPY_ROWS, | ||
| PIPELINE_ID_LABEL => pipeline_id.to_string(), | ||
| DESTINATION_LABEL => D::name(), |
There was a problem hiding this comment.
Maybe we should do the same for destination if it's not already done
|
|
||
| // Serialized via nextest test-group "shared-pg" (shares the source PG cluster). | ||
| #[tokio::test(flavor = "multi_thread")] | ||
| #[ignore = "modifies cluster-wide PG settings; run independently with: cargo test -- --ignored \ |
|
|
||
| // Serialized via nextest test-group "shared-pg" (shares the source PG cluster). | ||
| #[tokio::test(flavor = "multi_thread")] | ||
| #[ignore = "modifies cluster-wide PG settings; run independently with: cargo test -- --ignored \ |
| /// 4. Insert 3 new rows (ids 100-102) for users only | ||
| /// 5. Verify: users has 10 total rows (table_rows + events), orders unchanged | ||
| #[tokio::test(flavor = "multi_thread")] | ||
| async fn table_sync_drops_destination_table_after_state_reset() { |
bnjjj
left a comment
There was a problem hiding this comment.
Do not remove tests if this is not for removed code
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
The main goal is to get rid of
TableRowandCellto only use arrow types and benefit from arrow allocations and compliant destinations with arrow