mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-22 23:14:07 +00:00
Support minimum display width for integer data types (#337)
* Support minimum display width for integers * make fmt happy, updated docstrings
This commit is contained in:
parent
9a5716d94b
commit
77d90d3b85
6 changed files with 81 additions and 36 deletions
|
@ -2008,10 +2008,12 @@ impl<'a> Parser<'a> {
|
|||
let _ = self.parse_keyword(Keyword::PRECISION);
|
||||
Ok(DataType::Double)
|
||||
}
|
||||
Keyword::TINYINT => Ok(DataType::TinyInt),
|
||||
Keyword::SMALLINT => Ok(DataType::SmallInt),
|
||||
Keyword::INT | Keyword::INTEGER => Ok(DataType::Int),
|
||||
Keyword::BIGINT => Ok(DataType::BigInt),
|
||||
Keyword::TINYINT => Ok(DataType::TinyInt(self.parse_optional_precision()?)),
|
||||
Keyword::SMALLINT => Ok(DataType::SmallInt(self.parse_optional_precision()?)),
|
||||
Keyword::INT | Keyword::INTEGER => {
|
||||
Ok(DataType::Int(self.parse_optional_precision()?))
|
||||
}
|
||||
Keyword::BIGINT => Ok(DataType::BigInt(self.parse_optional_precision()?)),
|
||||
Keyword::VARCHAR => Ok(DataType::Varchar(self.parse_optional_precision()?)),
|
||||
Keyword::CHAR | Keyword::CHARACTER => {
|
||||
if self.parse_keyword(Keyword::VARYING) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue