@@ -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+ } ;
5860use 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