File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/sql/src/plan/statement Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ const MAX_NUM_COLUMNS: usize = 256;
176176const MANAGED_REPLICA_PATTERN : std:: sync:: LazyLock < regex:: Regex > =
177177 std:: sync:: LazyLock :: new ( || regex:: Regex :: new ( r"^r(\d)+$" ) . unwrap ( ) ) ;
178178
179+ /// Given a relation desc and a column list, checks that:
180+ /// - the column list is a prefix of the desc;
181+ /// - all the listed columns are types that have meaningful Persist-level ordering.
179182fn check_partition_by ( desc : & RelationDesc , partition_by : & [ ColumnName ] ) -> Result < ( ) , PlanError > {
180183 for ( idx, ( ( desc_name, desc_type) , partition_name) ) in
181184 desc. iter ( ) . zip ( partition_by. iter ( ) ) . enumerate ( )
@@ -184,7 +187,7 @@ fn check_partition_by(desc: &RelationDesc, partition_by: &[ColumnName]) -> Resul
184187 sql_bail ! ( "PARTITION BY columns should be a prefix of the relation's columns (expected {desc_name} at index {idx}, got {partition_name})" ) ;
185188 }
186189 if !preserves_order ( & desc_type. scalar_type ) {
187- sql_bail ! ( "PARTITION BY column {partition_name} has unsupported type" , ) ;
190+ sql_bail ! ( "PARTITION BY column {partition_name} has unsupported type" ) ;
188191 }
189192 }
190193 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments