Skip to content

Commit

Permalink
moer updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Dec 4, 2024
1 parent 0249eee commit 14e50a1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions datafusion/sql/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,8 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
| SQLDataType::TinyText
| SQLDataType::MediumText
| SQLDataType::LongText
| SQLDataType::Bit(_)
|SQLDataType::BitVarying(_)
=> not_impl_err!(
"Unsupported SQL type {sql_type:?}"
),
Expand Down
15 changes: 12 additions & 3 deletions datafusion/sql/src/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ use datafusion_expr::{
TransactionConclusion, TransactionEnd, TransactionIsolationLevel, TransactionStart,
Volatility, WriteOp,
};
use sqlparser::ast::{self, ShowStatementIn, ShowStatementOptions, SqliteOnConflict};
use sqlparser::ast::{
self, NullsDistinctOption, ShowStatementIn, ShowStatementOptions, SqliteOnConflict,
};
use sqlparser::ast::{
Assignment, AssignmentTarget, ColumnDef, CreateIndex, CreateTable,
CreateTableOptions, Delete, DescribeAlias, Expr as SQLExpr, FromTable, Ident, Insert,
Expand Down Expand Up @@ -107,6 +109,7 @@ fn calc_inline_constraints_from_columns(columns: &[ColumnDef]) -> Vec<TableConst
index_type_display: ast::KeyOrIndexDisplay::None,
index_type: None,
index_options: vec![],
nulls_distinct: NullsDistinctOption::None,
}),
ast::ColumnOption::Unique {
is_primary: true,
Expand Down Expand Up @@ -894,12 +897,18 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
modes,
begin: false,
modifier,
transaction,
} => {
if let Some(modifier) = modifier {
return not_impl_err!(
"Transaction modifier not supported: {modifier}"
);
}
if let Some(transaction) = transaction {
return not_impl_err!(
"Transaction kind not supported: {transaction}"
);
}
let isolation_level: ast::TransactionIsolationLevel = modes
.iter()
.filter_map(|m: &TransactionMode| match m {
Expand Down Expand Up @@ -963,7 +972,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
});
Ok(LogicalPlan::Statement(statement))
}
Statement::CreateFunction {
Statement::CreateFunction(ast::CreateFunction {
or_replace,
temporary,
name,
Expand All @@ -973,7 +982,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
behavior,
language,
..
} => {
}) => {
let return_type = match return_type {
Some(t) => Some(self.convert_data_type(&t)?),
None => None,
Expand Down

0 comments on commit 14e50a1

Please sign in to comment.