Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datafusion/proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn build() -> Result<(), String> {
let mut file = std::fs::OpenOptions::new()
.write(true)
.create(true)
.open("src/generated/datafusion.rs")
.open("src/generated/datafusion_json.rs")
.unwrap();
file.write(proto.as_str().as_ref()).unwrap();
file.write(json.as_str().as_ref()).unwrap();
Expand Down
6 changes: 6 additions & 0 deletions datafusion/proto/src/generated/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@
// include the generated protobuf source as a submodule
#[allow(clippy::all)]
#[rustfmt::skip]
#[cfg(not(feature = "json"))]
pub mod datafusion;

#[allow(clippy::all)]
#[rustfmt::skip]
#[cfg(feature = "json")]
pub mod datafusion_json;
6 changes: 5 additions & 1 deletion datafusion/proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ pub mod from_proto;
pub mod generated;
pub mod logical_plan;
pub mod to_proto;
use generated::datafusion as protobuf;

#[cfg(not(feature = "json"))]
pub use generated::datafusion as protobuf;
#[cfg(feature = "json")]
pub use generated::datafusion_json as protobuf;

#[cfg(doctest)]
doc_comment::doctest!("../README.md", readme_example_test);
Expand Down