@@ -484,17 +484,21 @@ static void PostgresScan(ClientContext &context, TableFunctionInput &data, DataC
484
484
local_state.ScanChunk (context, bind_data, gstate, output);
485
485
}
486
486
487
- static idx_t PostgresScanBatchIndex (ClientContext &context, const FunctionData *bind_data_p,
488
- LocalTableFunctionState *local_state_p, GlobalTableFunctionState *global_state) {
489
- auto &bind_data = bind_data_p->Cast <PostgresBindData>();
490
- auto &local_state = local_state_p->Cast <PostgresLocalState>();
491
- return local_state.batch_idx ;
487
+ static OperatorPartitionData PostgresGetPartitionData (ClientContext &context, TableFunctionGetPartitionInput &input) {
488
+ if (input.partition_info .RequiresPartitionColumns ()) {
489
+ throw InternalException (" PostgresScan::GetPartitionData: partition columns not supported" );
490
+ }
491
+ auto &bind_data = input.bind_data ->Cast <PostgresBindData>();
492
+ auto &local_state = input.local_state ->Cast <PostgresLocalState>();
493
+ return OperatorPartitionData (local_state.batch_idx );
492
494
}
493
495
494
- static string PostgresScanToString (const FunctionData *bind_data_p) {
495
- D_ASSERT (bind_data_p);
496
- auto &bind_data = bind_data_p->Cast <PostgresBindData>();
497
- return bind_data.table_name ;
496
+ static InsertionOrderPreservingMap<string> PostgresScanToString (TableFunctionToStringInput &input) {
497
+ D_ASSERT (input.bind_data );
498
+ InsertionOrderPreservingMap<string> result;
499
+ auto &bind_data = input.bind_data ->Cast <PostgresBindData>();
500
+ result[" Table" ] = bind_data.table_name ;
501
+ return result;
498
502
}
499
503
500
504
unique_ptr<NodeStatistics> PostgresScanCardinality (ClientContext &context, const FunctionData *bind_data_p) {
@@ -538,7 +542,7 @@ PostgresScanFunction::PostgresScanFunction()
538
542
to_string = PostgresScanToString;
539
543
serialize = PostgresScanSerialize;
540
544
deserialize = PostgresScanDeserialize;
541
- get_batch_index = PostgresScanBatchIndex ;
545
+ get_partition_data = PostgresGetPartitionData ;
542
546
cardinality = PostgresScanCardinality;
543
547
table_scan_progress = PostgresScanProgress;
544
548
projection_pushdown = true ;
@@ -551,7 +555,7 @@ PostgresScanFunctionFilterPushdown::PostgresScanFunctionFilterPushdown()
551
555
to_string = PostgresScanToString;
552
556
serialize = PostgresScanSerialize;
553
557
deserialize = PostgresScanDeserialize;
554
- get_batch_index = PostgresScanBatchIndex ;
558
+ get_partition_data = PostgresGetPartitionData ;
555
559
cardinality = PostgresScanCardinality;
556
560
table_scan_progress = PostgresScanProgress;
557
561
projection_pushdown = true ;
0 commit comments