tokoko commented on PR #13127: URL: https://github.com/apache/datafusion/pull/13127#issuecomment-2448030521
@Blizzara agreed. If I have to choose between this vs calling optimize in tests, I'd say avoiding second project is a lesser evil. @vbarua We could modify `apply_emit_kind` function to look something like this. This way "optimization" code would be less tangled with project code. ``` match retrieve_emit_kind(rel_common) { EmitKind::Direct(_) => Ok(plan), EmitKind::Emit(emit) => { if (rel is project) and (emit doesn't contain duplicates) { return modified project } else { return second project } } } ``` -- 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