Clean the `try ... finally ...` blocks in the `GpuFileFormatDataWriter`
Signed-off-by: remzi [email protected] Close #6615.
Changes in the PR
Replace
var v = null
try {
v = some_value
// do something with v
v.close()
v = null
} finally {
if (v != null) {
v.close()
}
}
with
withResource(some_value) { v =>
// do something with v
}
- We find that the
ParquetWriteSuitedoesn't cover all the code branches. So to add more cases to test the impactMaxRecordsPerFilein that suite.
build
build
build
build
build
build
build
build
build
build
Hi, @jlowe, I prefer to drop this PR as it seems like the withReousrce can't make the code cleaner in this context. What's your opinion.
Some of the changes in this PR are fine, it's mostly problematic in the write method (which admittedly is most of the PR). Given the write method needs refactoring to resolve #6980, we can postpone changes to that method for now.
@HaoYang670 this should be moved to 23.02 as it doesn't make sense to put this into 22.12 at this point in its release cycle.
this should be moved to 23.02
My apologies, that's already occurred.