-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
NIFI-14106 Fixed bug which led to loss of dates and times precision. #9718
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dan-s1 Can you include a link to the issue created for the POI project? This change includes copying a good bit of code, and the particular elements that required modification are not clear. On a cursory read, if we proceed with this approach, it seems like there are some aspects of the methods that are not needed.
@exceptionfactory Is what I included now in the description enough? |
Thanks for providing the additional background and link, that is helpful. I'm a bit concerned about the level of complexity from these additional methods, but I haven't walked through the details closely. I will plan on reviewing soon. |
When copying code from another project, one must include a note to that effect in the NOTICE file the NAR, correct? However, I would be -1 on copying POI code into NiFi, when we could instead simply wait for a POI release that has the desired behavior. |
I agree with you @mosermw, it looks like there has already been some progress on this issue in the POI project, so it seems better to wait for those changes to be completed and released. |
@dan-s1 It looks like the changes in POI in the following commit and several others related would obviate the changes in this pull request: With the work there, it seems best to close this pull request and track the POI version changes when they are ready. What do you think? |
@exceptionfactory Thanks for showing me that latest commit as that was the change I was waiting for to allow for reverting the changes of #9466. It seems the POI changes would solve all the issues I had so I am fine with closing this PR. Should I put something in a comment on the ticket so we know to watch for this? |
@dan-s1, Yes, a comment in the Jira, linking to the POI commit and mentioning that this should be resolved in the next version would be helpful. |
@exceptionfactory Okay I added that. Is there anyway to put the ticket on hold in Jira? |
I'm not seeing a blocked status option in Jira, but that's fine, the comment is sufficient for now. |
@exceptionfactory I just wanted to add even after the latest POI changes, there is still a need to revert the changes made in #9466 to allow cell styles to be copied which would enable copying of date formats. I think this ticket could cover that. Is that okay or should another ticket be created? |
Sure, this ticket can cover those changes. |
@exceptionfactory I encapsulated the copy rows logic in a private static class as you had suggested and I updated the NOTICE file accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updated approach @dan-s1. I plan to take a closer look soon.
Summary
NIFI-14106
As detailed in the ticket , I reverted the change made in #9466 as the
org.apache.poi.ss.usermodel.CellCopyContext
can be used to prevent exceeding the cell styles. In addition this PR involved having to correct a POI bug which I reported in the following thread and can be found here. As a result I had to copy the following methods from the following classes in order to fix the bug and make use oforg.apache.poi.ss.usermodel.CellCopyContext
.copyRows
fromorg.apache.poi.xssf.usermodel.XSSFSheet
copyRowFrom
fromorg.apache.poi.xssf.usermodel.XSSFRow
copyCell
fromorg.apache.poi.ss.util.CellUtil
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation