jonahgao commented on code in PR #15120: URL: https://github.com/apache/datafusion/pull/15120#discussion_r1987404498
########## datafusion/expr/src/expr.rs: ########## @@ -392,11 +392,34 @@ impl Unnest { } /// Alias expression -#[derive(Clone, PartialEq, Eq, PartialOrd, Hash, Debug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct Alias { pub expr: Box<Expr>, pub relation: Option<TableReference>, pub name: String, + pub metadata: Option<std::collections::HashMap<String, String>>, Review Comment: Aliases may be lost during expression rewriting. eg . https://github.com/apache/datafusion/blob/a176aacc92a5b0272690bb48e7084ff5603ef7ad/datafusion/optimizer/src/analyzer/type_coercion.rs#L1018 According to the description of the PR, I think only columns/fields have metadata, not all expressions. `Field` already has customizable [metadata](https://github.com/apache/arrow-rs/blob/f5138fcb10040e2428f2dd540177f5f224d0281e/arrow-schema/src/field.rs#L53); is it possible to use it to meet the requirements🤔? -- 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