File tree Expand file tree Collapse file tree
crates/data-generation/src/dataset Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -424,11 +424,13 @@ impl Dataset for TpchDataset {
424424 }
425425
426426 fn primary_key ( & self , table : & str ) -> Vec < String > {
427+ // Partition columns must be included in the primary key for correct
428+ // on-conflict behavior in distributed (scheduler+executor) mode.
427429 match table {
428430 "region" => vec ! [ "r_regionkey" . to_string( ) ] ,
429- "nation" => vec ! [ "n_nationkey" . to_string( ) ] ,
430- "supplier" => vec ! [ "s_suppkey" . to_string( ) ] ,
431- "customer" => vec ! [ "c_custkey" . to_string( ) ] ,
431+ "nation" => vec ! [ "n_nationkey" . to_string( ) , "n_regionkey" . to_string ( ) ] ,
432+ "supplier" => vec ! [ "s_suppkey" . to_string( ) , "s_nationkey" . to_string ( ) ] ,
433+ "customer" => vec ! [ "c_custkey" . to_string( ) , "c_nationkey" . to_string ( ) ] ,
432434 "part" => vec ! [ "p_partkey" . to_string( ) ] ,
433435 "partsupp" => vec ! [ "ps_partkey" . to_string( ) , "ps_suppkey" . to_string( ) ] ,
434436 "orders" => vec ! [ "o_orderkey" . to_string( ) ] ,
You can’t perform that action at this time.
0 commit comments