Skip to content

Commit

Permalink
fix: remove column id check (#17494) (#17496)
Browse files Browse the repository at this point in the history
Signed-off-by: tabVersion <[email protected]>
Co-authored-by: Bohan Zhang <[email protected]>
  • Loading branch information
github-actions[bot] and tabVersion authored Jul 1, 2024
1 parent e61b27e commit 1a15906
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/frontend/src/handler/create_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,28 +492,6 @@ pub(crate) async fn bind_columns_from_source(
}
};

if cfg!(debug_assertions) {
// validate column ids
// Note: this just documents how it works currently. It doesn't mean whether it's reasonable.
if let Some(ref columns) = columns {
let mut i = 1;
fn check_col(col: &ColumnDesc, i: &mut usize, columns: &Vec<ColumnCatalog>) {
for nested_col in &col.field_descs {
// What's the usage of struct fields' column IDs?
check_col(nested_col, i, columns);
}
assert!(
col.column_id.get_id() == *i as i32,
"unexpected column id\ncol: {col:?}\ni: {i}\ncolumns: {columns:#?}"
);
*i += 1;
}
for col in columns {
check_col(&col.column_desc, &mut i, columns);
}
}
}

if !format_encode_options_to_consume.is_empty() {
let err_string = format!(
"Get unknown format_encode_options for {:?} {:?}: {}",
Expand Down

0 comments on commit 1a15906

Please sign in to comment.