mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
Parse casting to array using double colon operator in Redshift (#1737)
This commit is contained in:
parent
1f1c0693da
commit
7fc37a76e5
7 changed files with 21 additions and 8 deletions
|
|
@ -9123,9 +9123,9 @@ impl<'a> Parser<'a> {
|
|||
_ => self.expected_at("a data type name", next_token_index),
|
||||
}?;
|
||||
|
||||
if self.dialect.supports_array_typedef_size() {
|
||||
// Parse array data type size
|
||||
if self.dialect.supports_array_typedef_with_brackets() {
|
||||
while self.consume_token(&Token::LBracket) {
|
||||
// Parse optional array data type size
|
||||
let size = self.maybe_parse(|p| p.parse_literal_uint())?;
|
||||
self.expect_token(&Token::RBracket)?;
|
||||
data = DataType::Array(ArrayElemTypeDef::SquareBracket(Box::new(data), size))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue