jayzhan211 commented on issue #14247: URL: https://github.com/apache/datafusion/issues/14247#issuecomment-2611300978
> try to evolve incrementally, keep using DataType in many places, but add metadata to more and more places incrementally. At the end of this, the code is not beautiful (rather hard to reason about), and in the meantime it's not correct Evolving incrementally is the way to go. `logical-types` is an example that it is quite an challenge for contributor and reviewer to keep it up until it lands. Consider the `logical type` support, we might switch to LogicalType trait in the future, we can implement LogicalType for those extension types. In this case, we don't need `Field`. ```rust pub struct ReturnTypeArgs<'a> { /// The data types of the arguments to the function pub arg_types: &'a [Arc<dyn LogicalType>], /// ... pub scalar_arguments: &'a [Option<&'a ScalarValue>], } ``` However, given `logical types` is still work in progress, and not clear whether the assumption and the design makes sense at all, I think switching to `Field` and incrementally evolve would be a better choice -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org