Skip to content

Commit a91870c

Browse files
committed
feat: try to support user-defined types
1 parent e642cc2 commit a91870c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1595
-570
lines changed

datafusion-examples/examples/rewrite_expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
use arrow::datatypes::{DataType, Field, Schema, SchemaRef};
1919
use datafusion_common::config::ConfigOptions;
20+
use datafusion_common::logical_type::LogicalType;
2021
use datafusion_common::tree_node::{Transformed, TreeNode};
2122
use datafusion_common::{plan_err, DataFusionError, Result, ScalarValue};
2223
use datafusion_expr::{
@@ -212,7 +213,7 @@ impl ContextProvider for MyContextProvider {
212213
None
213214
}
214215

215-
fn get_variable_type(&self, _variable_names: &[String]) -> Option<DataType> {
216+
fn get_variable_type(&self, _variable_names: &[String]) -> Option<LogicalType> {
216217
None
217218
}
218219

datafusion/common/src/column.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ impl fmt::Display for Column {
357357
mod tests {
358358
use super::*;
359359
use crate::DFField;
360-
use arrow::datatypes::DataType;
361360
use std::collections::HashMap;
362361

363362
fn create_schema(names: &[(Option<&str>, &str)]) -> Result<DFSchema> {
@@ -367,7 +366,7 @@ mod tests {
367366
DFField::new(
368367
qualifier.to_owned().map(|s| s.to_string()),
369368
name,
370-
DataType::Boolean,
369+
LogicalType::Boolean,
371370
true,
372371
)
373372
})

0 commit comments

Comments
 (0)