Skip to content

Apache DataFusion SQL Query Engine

fix: CI compilation failed on substrait (#10683)

Jonah Gao9c065065dfb4
diff --git a/datafusion/substrait/src/logical_plan/producer.rs b/datafusion/substrait/src/logical_plan/producer.rs
index 400609ff14..592b40db59 100644
--- a/datafusion/substrait/src/logical_plan/producer.rs
+++ b/datafusion/substrait/src/logical_plan/producer.rs
@@ -1411,7 +1411,7 @@ fn to_substrait_type(dt: &DataType, nullable: bool) -> Result<substrait::proto::
parameter: Some(parameter::Parameter::DataType(substrait::proto::Type {
kind: Some(r#type::Kind::I32(r#type::I32 {
type_variation_reference: DEFAULT_TYPE_REF,
- nullability: default_nullability,
+ nullability: r#type::Nullability::Unspecified as i32,
})),
})),
};
@@ -1419,7 +1419,7 @@ fn to_substrait_type(dt: &DataType, nullable: bool) -> Result<substrait::proto::
parameter: Some(parameter::Parameter::DataType(substrait::proto::Type {
kind: Some(r#type::Kind::I64(r#type::I64 {
type_variation_reference: DEFAULT_TYPE_REF,
- nullability: default_nullability,
+ nullability: r#type::Nullability::Unspecified as i32,
})),
})),
};
@@ -1443,7 +1443,7 @@ fn to_substrait_type(dt: &DataType, nullable: bool) -> Result<substrait::proto::
kind: Some(r#type::Kind::UserDefined(r#type::UserDefined {
type_reference,
type_variation_reference: DEFAULT_TYPE_REF,
- nullability: default_nullability,
+ nullability,
type_parameters,
})),
})