Skip to content

Commit 097e893

Browse files
authored
Add cfg(feature = "avro") attribute to Avro example in SQL API docs (apache#17142)
* docs: add feature flag for Avro support in SQL API example * docs: update code block syntax for memory allocator example in crate configuration * docs: update code block syntax for CSV example in UDFs documentation * chore(deps): add snmalloc-rs dependency version 0.3 * fix(docs): update Avro example to conditionally compile and remove empty code block * feat(ci): add snmalloc build dependencies installation to workflows * feat(ci): add installation of cmake system build dependencies in workflows * fix(docs): correct formatting of Avro example code block in SQL API documentation * Restore main's dependencies, ci workflow * fix: update code block to ignore execution requiring snmalloc in crate-configuration.md * revert md block to no-run * revert block text to csv
1 parent 033fc9b commit 097e893

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/source/library-user-guide/using-the-sql-api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ async fn main() -> Result<()> {
119119
DataFusion can also read Avro files using the `register_avro` method.
120120

121121
```rust
122+
# #[cfg(feature = "avro")]
123+
{
122124
use datafusion::arrow::util::pretty;
123125
use datafusion::error::Result;
124126
use datafusion::prelude::*;
@@ -154,6 +156,7 @@ async fn main() -> Result<()> {
154156
);
155157
Ok(())
156158
}
159+
}
157160
```
158161

159162
## Reading Multiple Files as a table

0 commit comments

Comments
 (0)