Skip to content

Apache DataFusion SQL Query Engine

feat: add version field to ExecutionContext (#6052)

Alex Huang9775305bfa91
diff --git a/datafusion/core/src/execution/context.rs b/datafusion/core/src/execution/context.rs
index 38063b8fed..265595c59d 100644
--- a/datafusion/core/src/execution/context.rs
+++ b/datafusion/core/src/execution/context.rs
@@ -1803,6 +1803,11 @@ impl SessionState {
pub fn aggregate_functions(&self) -> &HashMap<String, Arc<AggregateUDF>> {
&self.aggregate_functions
}
+
+ /// Return version of the cargo package that produced this query
+ pub fn version(&self) -> &str {
+ env!("CARGO_PKG_VERSION")
+ }
}
struct SessionContextProvider<'a> {