@@ -291,7 +291,7 @@ impl PartialOrd for CreateExternalTable {
291
291
}
292
292
293
293
impl CreateExternalTable {
294
- pub fn new ( fields : CreateExternalTableFields ) -> Result < Self > {
294
+ pub fn try_new ( fields : CreateExternalTableFields ) -> Result < Self > {
295
295
let CreateExternalTableFields {
296
296
name,
297
297
schema,
@@ -365,7 +365,7 @@ impl CreateExternalTable {
365
365
366
366
/// A struct with same fields as [`CreateExternalTable`] struct so that the DDL can be conveniently
367
367
/// destructed with validation that each field is handled, while still requiring that all
368
- /// construction goes through the [`CreateExternalTable::new `] constructor or the builder.
368
+ /// construction goes through the [`CreateExternalTable::try_new `] constructor or the builder.
369
369
pub struct CreateExternalTableFields {
370
370
/// The table name
371
371
pub name : TableReference ,
@@ -497,7 +497,7 @@ impl CreateExternalTableBuilder {
497
497
}
498
498
499
499
pub fn build ( self ) -> Result < CreateExternalTable > {
500
- CreateExternalTable :: new ( CreateExternalTableFields {
500
+ CreateExternalTable :: try_new ( CreateExternalTableFields {
501
501
name : self . name . expect ( "name is required" ) ,
502
502
schema : self . schema . expect ( "schema is required" ) ,
503
503
location : self . location . expect ( "location is required" ) ,
@@ -536,7 +536,7 @@ pub struct CreateMemoryTable {
536
536
}
537
537
538
538
impl CreateMemoryTable {
539
- pub fn new ( fields : CreateMemoryTableFields ) -> Result < Self > {
539
+ pub fn try_new ( fields : CreateMemoryTableFields ) -> Result < Self > {
540
540
let CreateMemoryTableFields {
541
541
name,
542
542
constraints,
@@ -586,7 +586,7 @@ impl CreateMemoryTable {
586
586
587
587
/// A struct with same fields as [`CreateMemoryTable`] struct so that the DDL can be conveniently
588
588
/// destructed with validation that each field is handled, while still requiring that all
589
- /// construction goes through the [`CreateMemoryTable::new `] constructor or the builder.
589
+ /// construction goes through the [`CreateMemoryTable::try_new `] constructor or the builder.
590
590
pub struct CreateMemoryTableFields {
591
591
/// The table name
592
592
pub name : TableReference ,
@@ -664,7 +664,7 @@ impl CreateMemoryTableBuilder {
664
664
}
665
665
666
666
pub fn build ( self ) -> Result < CreateMemoryTable > {
667
- CreateMemoryTable :: new ( CreateMemoryTableFields {
667
+ CreateMemoryTable :: try_new ( CreateMemoryTableFields {
668
668
name : self . name . expect ( "name is required" ) ,
669
669
constraints : self . constraints ,
670
670
input : self . input . expect ( "input is required" ) ,
@@ -693,7 +693,7 @@ pub struct CreateView {
693
693
}
694
694
695
695
impl CreateView {
696
- pub fn new ( fields : CreateViewFields ) -> Result < Self > {
696
+ pub fn try_new ( fields : CreateViewFields ) -> Result < Self > {
697
697
let CreateViewFields {
698
698
name,
699
699
input,
@@ -735,7 +735,7 @@ impl CreateView {
735
735
736
736
/// A struct with same fields as [`CreateView`] struct so that the DDL can be conveniently
737
737
/// destructed with validation that each field is handled, while still requiring that all
738
- /// construction goes through the [`CreateView::new `] constructor or the builder.
738
+ /// construction goes through the [`CreateView::try_new `] constructor or the builder.
739
739
pub struct CreateViewFields {
740
740
/// The table name
741
741
pub name : TableReference ,
@@ -795,7 +795,7 @@ impl CreateViewBuilder {
795
795
}
796
796
797
797
pub fn build ( self ) -> Result < CreateView > {
798
- CreateView :: new ( CreateViewFields {
798
+ CreateView :: try_new ( CreateViewFields {
799
799
name : self . name . expect ( "name is required" ) ,
800
800
input : self . input . expect ( "input is required" ) ,
801
801
or_replace : self . or_replace ,
0 commit comments