File tree Expand file tree Collapse file tree 2 files changed +0
-32
lines changed
Expand file tree Collapse file tree 2 files changed +0
-32
lines changed Original file line number Diff line number Diff line change @@ -383,26 +383,6 @@ impl CreateTableBuilder {
383383 self
384384 }
385385
386- /// Returns true if the statement has exactly one source of info on the schema of the new table.
387- /// This is Snowflake-specific, some dialects allow more than one source.
388- pub ( crate ) fn validate_schema_info ( & self ) -> bool {
389- let mut sources = 0 ;
390- if !self . columns . is_empty ( ) {
391- sources += 1 ;
392- }
393- if self . query . is_some ( ) {
394- sources += 1 ;
395- }
396- if self . like . is_some ( ) {
397- sources += 1 ;
398- }
399- if self . clone . is_some ( ) {
400- sources += 1 ;
401- }
402-
403- sources == 1
404- }
405-
406386 pub fn build ( self ) -> Statement {
407387 Statement :: CreateTable ( CreateTable {
408388 or_replace : self . or_replace ,
Original file line number Diff line number Diff line change @@ -690,21 +690,9 @@ pub fn parse_create_table(
690690 builder = builder. columns ( columns) . constraints ( constraints) ;
691691 }
692692 Token :: EOF => {
693- if !builder. validate_schema_info ( ) {
694- return Err ( ParserError :: ParserError (
695- "unexpected end of input" . to_string ( ) ,
696- ) ) ;
697- }
698-
699693 break ;
700694 }
701695 Token :: SemiColon => {
702- if !builder. validate_schema_info ( ) {
703- return Err ( ParserError :: ParserError (
704- "unexpected end of input" . to_string ( ) ,
705- ) ) ;
706- }
707-
708696 parser. prev_token ( ) ;
709697 break ;
710698 }
You can’t perform that action at this time.
0 commit comments