- 🇷🇴Romania gge
- 🇧🇴Bolivia manuvelasco Bolivia
patch #2 works for me with a batch configuration.
Thank you so much. - Status changed to Needs review
about 1 year ago 6:39am 20 February 2024 - last update
about 1 year ago 3 pass - 🇮🇳India chaitanyadessai Goa
chaitanyadessai → changed the visibility of the branch 3169049-7 to hidden.
- last update
about 1 year ago 3 pass - 🇬🇷Greece vensires
@chaitanyadessai, patch from #2 seems to work fine in latest views_data_export stable version. Is your patch maybe based on top of the -dev version? I believe we can set it as RTBC but just wanted to clarify this one for the maintainers to know what to merge.
- 🇬🇷Greece vensires
I tested both patches with the batch implementation and they fail to work properly. Whether this works or not depends on the row values of each batch. If no values exist at all in a specific column, it does get hidden. But if the first batch has values and the second hasn't, then the second set's columns are shifted. This is especially visible if there are other columns with values next to the one being hidden.
To be honest, I personally can't guess any possible way to implement this in batch without possible performance issues.
- 🇬🇧United Kingdom steven jones
To be honest, I personally can't guess any possible way to implement this in batch without possible performance issues.
I think you'd need to change the architecture of this a decent amount. You'd do all the writing, keeping all the columns, and then before serving up the file for download, you'd iterate over all lines of the file checking to see if any of the cells on that line are non-empty. After reading all lines, you'd know which columns were completely empty.
Then you'd go back over and remove those columns from each row.
Painful, but should be doable within PHP memory limits if one is careful to not load the entire file in memory all at once.Maybe for the 1.x branch we should only support removing empty columns in non-batched mode, and work on the post-processing pipeline described above a later version?
- 🇬🇷Greece vensires
I believe we could go on with this issue for the standard mode, yes. I set it as "Needs Review" but it could be "RTBC" too.
Just one question to answer:
Do we need anything extra (change README.md, inline comment, extra validation etc) to mention that the implementation targets the Standard export mode only? Or is it just... discovered by anyone trying? - 🇬🇧United Kingdom steven jones
Yeah, I think we should make it clear in the views UI that the removal of empty columns only works in non-batched mode.