Skip to content

Commit

Permalink
feat: try to support user-defined types
Browse files Browse the repository at this point in the history
  • Loading branch information
yukkit committed Nov 13, 2023
1 parent e642cc2 commit b2fc8e7
Show file tree
Hide file tree
Showing 55 changed files with 1,656 additions and 664 deletions.
3 changes: 2 additions & 1 deletion datafusion-examples/examples/rewrite_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

use arrow::datatypes::{DataType, Field, Schema, SchemaRef};
use datafusion_common::config::ConfigOptions;
use datafusion_common::logical_type::LogicalType;
use datafusion_common::tree_node::{Transformed, TreeNode};
use datafusion_common::{plan_err, DataFusionError, Result, ScalarValue};
use datafusion_expr::{
Expand Down Expand Up @@ -212,7 +213,7 @@ impl ContextProvider for MyContextProvider {
None
}

fn get_variable_type(&self, _variable_names: &[String]) -> Option<DataType> {
fn get_variable_type(&self, _variable_names: &[String]) -> Option<LogicalType> {
None
}

Expand Down
3 changes: 1 addition & 2 deletions datafusion/common/src/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ impl fmt::Display for Column {
mod tests {
use super::*;
use crate::DFField;
use arrow::datatypes::DataType;
use std::collections::HashMap;

fn create_schema(names: &[(Option<&str>, &str)]) -> Result<DFSchema> {
Expand All @@ -367,7 +366,7 @@ mod tests {
DFField::new(
qualifier.to_owned().map(|s| s.to_string()),
name,
DataType::Boolean,
LogicalType::Boolean,
true,
)
})
Expand Down
Loading

0 comments on commit b2fc8e7

Please sign in to comment.