amaliujia commented on PR #38793: URL: https://github.com/apache/spark/pull/38793#issuecomment-1327968820
@hvanhovell Well the simple answer is WithColumn API's parameters are not named `Alias`. But my longer thought is: Alias has its defined semantics (including those fields). That semantics does not match what this PR looks for. Alias happens to have two fields that can help this PR (and Alias has one more field which is metadata for the its semantics). I think it's a good to avoid using a message only because the fields type fit but the semantics does not match. In principle, The message semantics can evolve so over-using it will cause trouble. Just a bad example: one day we will decide that Alias should only accept an alias which type is float. Then those places that truly deal with Alias which makes sense. But our WithColumns will not be compatible because we happen to use Alias due to same field type but not match with its semantics. So we re-use a message because of the matching semantics. If the semantics match but even there is a lack of capability, we can even extend the message by adding more fields etc. to help. But it does not work vice verse. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
