Skip to content

Commit c8a839f

Browse files
committed
add more docs
Signed-off-by: Bugen Zhao <[email protected]>
1 parent 531c562 commit c8a839f

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/frontend/src/handler/create_source.rs

+17-3
Original file line numberDiff line numberDiff line change
@@ -650,11 +650,25 @@ pub fn bind_connector_props(
650650
Ok(with_properties)
651651
}
652652

653-
/// When the schema can be inferred from external system,
654-
/// how to handle the columns (excluding generated columns) from SQL?
653+
/// When the schema can be inferred from external system (like schema registry),
654+
/// how to handle the regular columns (i.e., non-generated) from SQL?
655655
pub enum SqlColumnStrategy {
656-
Ignore,
656+
/// Follow all columns from SQL, ignore the columns from external system.
657+
///
658+
/// This is the behavior when `SINK INTO` or `[ADD | DROP] COLUMN` atop the purified SQL,
659+
/// ensuring that no accidental refresh will happen and the schema remains unchanged.
657660
Follow,
661+
662+
/// Merge the generated columns from SQL and columns from external system. If there are
663+
/// regular columns from SQL, ignore silently.
664+
///
665+
/// This is the behavior when `REFRESH SCHEMA` atop the purified SQL.
666+
Ignore,
667+
668+
/// Merge the generated columns from SQL and columns from external system. If there are
669+
/// regular columns from SQL, reject the request with an error.
670+
///
671+
/// This is the behavior when creating a source with a purified SQL.
658672
Reject,
659673
}
660674

0 commit comments

Comments
 (0)