Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[G9u7OAg9] Ignore check for optimizations if the format is CSV #542

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

gem-neo4j
Copy link
Contributor

CSV export can't use optimizations, so the check that it is correct is not very useful. In general we should probably clean up these configs as it is quite messy having all of them, but that requires an investigation into which procedure needs what 👀

@gem-neo4j gem-neo4j force-pushed the dev_dont_error_for_csv_config_missing_optimizations branch 2 times, most recently from b94dfbf to fa04d10 Compare November 24, 2023 08:24
Comment on lines +177 to 181
if (!OptimizationType.NONE.equals(this.optimizationType) && this.unwindBatchSize > this.batchSize
&& !ExportFormat.CSV.equals(this.format)) {
throw new RuntimeException("`unwindBatchSize` must be <= `batchSize`, but got [unwindBatchSize:"
+ unwindBatchSize + ", batchSize:" + batchSize + "]");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say this message is not good. It's better to split into another condition where we throw a specific exception for the case where we've passed an optimization and a csv format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem with erroring when someone passes an optimization format and CSV is that it was required before due to this bug, so erroring on that would be breaking for everyone using CSV 😅

@gem-neo4j gem-neo4j force-pushed the dev_dont_error_for_csv_config_missing_optimizations branch from fa04d10 to 0a3eb35 Compare December 5, 2023 14:46
@gem-neo4j gem-neo4j merged commit 0479857 into dev Dec 5, 2023
18 checks passed
@gem-neo4j gem-neo4j deleted the dev_dont_error_for_csv_config_missing_optimizations branch December 5, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants