Skip to content

Commit 14e50a1

Browse files
committed
moer updates
1 parent 0249eee commit 14e50a1

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

datafusion/sql/src/planner.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,8 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
594594
| SQLDataType::TinyText
595595
| SQLDataType::MediumText
596596
| SQLDataType::LongText
597+
| SQLDataType::Bit(_)
598+
|SQLDataType::BitVarying(_)
597599
=> not_impl_err!(
598600
"Unsupported SQL type {sql_type:?}"
599601
),

datafusion/sql/src/statement.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ use datafusion_expr::{
5454
TransactionConclusion, TransactionEnd, TransactionIsolationLevel, TransactionStart,
5555
Volatility, WriteOp,
5656
};
57-
use sqlparser::ast::{self, ShowStatementIn, ShowStatementOptions, SqliteOnConflict};
57+
use sqlparser::ast::{
58+
self, NullsDistinctOption, ShowStatementIn, ShowStatementOptions, SqliteOnConflict,
59+
};
5860
use sqlparser::ast::{
5961
Assignment, AssignmentTarget, ColumnDef, CreateIndex, CreateTable,
6062
CreateTableOptions, Delete, DescribeAlias, Expr as SQLExpr, FromTable, Ident, Insert,
@@ -107,6 +109,7 @@ fn calc_inline_constraints_from_columns(columns: &[ColumnDef]) -> Vec<TableConst
107109
index_type_display: ast::KeyOrIndexDisplay::None,
108110
index_type: None,
109111
index_options: vec![],
112+
nulls_distinct: NullsDistinctOption::None,
110113
}),
111114
ast::ColumnOption::Unique {
112115
is_primary: true,
@@ -894,12 +897,18 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
894897
modes,
895898
begin: false,
896899
modifier,
900+
transaction,
897901
} => {
898902
if let Some(modifier) = modifier {
899903
return not_impl_err!(
900904
"Transaction modifier not supported: {modifier}"
901905
);
902906
}
907+
if let Some(transaction) = transaction {
908+
return not_impl_err!(
909+
"Transaction kind not supported: {transaction}"
910+
);
911+
}
903912
let isolation_level: ast::TransactionIsolationLevel = modes
904913
.iter()
905914
.filter_map(|m: &TransactionMode| match m {
@@ -963,7 +972,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
963972
});
964973
Ok(LogicalPlan::Statement(statement))
965974
}
966-
Statement::CreateFunction {
975+
Statement::CreateFunction(ast::CreateFunction {
967976
or_replace,
968977
temporary,
969978
name,
@@ -973,7 +982,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
973982
behavior,
974983
language,
975984
..
976-
} => {
985+
}) => {
977986
let return_type = match return_type {
978987
Some(t) => Some(self.convert_data_type(&t)?),
979988
None => None,

0 commit comments

Comments
 (0)