chore(planner): view query use PostgreSQL dialect
@@ -24,6 +24,7 @@ use common_ast::ast::TimeTravelPoint;
use common_ast::parser::parse_sql;
use common_ast::parser::tokenize_sql;
use common_ast::Backtrace;
+use common_ast::Dialect;
use common_ast::DisplayError;
use common_catalog::catalog::CATALOG_DEFAULT;
use common_datavalues::prelude::*;
@@ -135,11 +136,9 @@ impl<'a> Binder {
.options()
.get(QUERY)
.ok_or_else(|| ErrorCode::LogicalError("Invalid VIEW object"))?;
- let settings = self.ctx.get_settings();
- let sql_dialect = settings.get_sql_dialect()?;
let tokens = tokenize_sql(query.as_str())?;
let backtrace = Backtrace::new();
- let (stmt, _) = parse_sql(&tokens, sql_dialect, &backtrace)?;
+ let (stmt, _) = parse_sql(&tokens, Dialect::PostgreSQL, &backtrace)?;
if let Statement::Query(query) = &stmt {
self.bind_query(bind_context, query).await
} else {
