Skip to content

Commit 36eac89

Browse files
authored
DFParser should skip unsupported COPY INTO (#10)
1 parent 4930757 commit 36eac89

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

FETCH_HEAD

Whitespace-only changes.

datafusion/sql/src/parser.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,14 @@ impl<'a> DFParser<'a> {
354354
self.parse_create()
355355
}
356356
Keyword::COPY => {
357+
if let Token::Word(w) = self.parser.peek_nth_token(1).token {
358+
// use native parser for COPY INTO
359+
if w.keyword == Keyword::INTO {
360+
return Ok(Statement::Statement(Box::from(
361+
self.parser.parse_statement()?,
362+
)));
363+
}
364+
}
357365
self.parser.next_token(); // COPY
358366
self.parse_copy()
359367
}

0 commit comments

Comments
 (0)