blaginin commented on PR #15255: URL: https://github.com/apache/datafusion/pull/15255#issuecomment-2729413005
> I tried allow_duplicates!(), but it gets a bit tricky with async functions Can you please explain more on this? I tried modifying _async_ `run_and_compare_query` and this worked for me: <img width="789" alt="image" src="https://github.com/user-attachments/assets/0589862a-f891-453f-aa1d-e3af3a77aaa0" /> > So, I used snapshot files instead because they make it much easier to run multiple tests using the same query fn, also it makes it much easier to update expected outputs in the future and eliminates the use of #[rustfmt::skip] in some places. Just to give a bit of context, we had a discussion about inline / file snapshots here: https://github.com/apache/datafusion/pull/13672#discussion_r1894531818 and https://github.com/apache/datafusion/pull/13672#discussion_r1894532385. To me personally, it feels like we can use snapshot files, but the snapshot itself should give enough information to understand the context. For example, in CLI, you can see [program input and tests](https://github.com/apache/datafusion/blob/87eec43856a5d8cefef24d1ff85d375d2b58d8c2/datafusion-cli/tests/snapshots/cli_format%40csv.snap#L6-L9), and the snapshot file itself doesn't contain a lot of logic. -- 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