File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ fn build() -> Result<(), String> {
5555 let mut file = std:: fs:: OpenOptions :: new ( )
5656 . write ( true )
5757 . create ( true )
58- . open ( "src/generated/datafusion .rs" )
58+ . open ( "src/generated/datafusion_json .rs" )
5959 . unwrap ( ) ;
6060 file. write ( proto. as_str ( ) . as_ref ( ) ) . unwrap ( ) ;
6161 file. write ( json. as_str ( ) . as_ref ( ) ) . unwrap ( ) ;
Original file line number Diff line number Diff line change 1818// include the generated protobuf source as a submodule
1919#[ allow( clippy:: all) ]
2020#[ rustfmt:: skip]
21+ #[ cfg( not( feature = "json" ) ) ]
2122pub mod datafusion;
23+
24+ #[ allow( clippy:: all) ]
25+ #[ rustfmt:: skip]
26+ #[ cfg( feature = "json" ) ]
27+ pub mod datafusion_json;
Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ pub mod from_proto;
2424pub mod generated;
2525pub mod logical_plan;
2626pub mod to_proto;
27- use generated:: datafusion as protobuf;
27+
28+ #[ cfg( not( feature = "json" ) ) ]
29+ pub use generated:: datafusion as protobuf;
30+ #[ cfg( feature = "json" ) ]
31+ pub use generated:: datafusion_json as protobuf;
2832
2933#[ cfg( doctest) ]
3034doc_comment:: doctest!( "../README.md" , readme_example_test) ;
You can’t perform that action at this time.
0 commit comments