Support for ClickHouse array types (e.g. [1,2,3]) (#429)

This commit is contained in:
Simon Liu 2022-03-09 00:44:32 +08:00 committed by GitHub
parent 994b86a45c
commit 3f5619446f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 14 deletions

View file

@ -828,10 +828,13 @@ fn parse_array_index_expr() {
assert_eq!(
&Expr::ArrayIndex {
obj: Box::new(Expr::Nested(Box::new(Expr::Cast {
expr: Box::new(Expr::Array(vec![Expr::Array(vec![
num[2].clone(),
num[3].clone(),
])])),
expr: Box::new(Expr::Array(Array {
elem: vec![Expr::Array(Array {
elem: vec![num[2].clone(), num[3].clone(),],
named: true,
})],
named: true,
})),
data_type: DataType::Array(Box::new(DataType::Array(Box::new(DataType::Int(
None
)))))