You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/04/21 19:11:34 UTC

[Bug 57844] New: SXSSFSheet.shiftRows() throws java.lang.RuntimeException: NotImplemented

https://bz.apache.org/bugzilla/show_bug.cgi?id=57844

            Bug ID: 57844
           Summary: SXSSFSheet.shiftRows() throws
                    java.lang.RuntimeException: NotImplemented
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SXSSF
          Assignee: dev@poi.apache.org
          Reporter: mshlayen@smart-solution.com

Created attachment 32675
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32675&action=edit
Small java program to test SXSSFSheet.shiftRows() functionality

SXSSFSheet.shiftRows() throws java.lang.RuntimeException: NotImplemented

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57844] SXSSFSheet.shiftRows() throws java.lang.RuntimeException: NotImplemented

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57844

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
I'm not sure we're going to be able to add support for this in SXSSF - shifting
rows generally requires updating all sorts of back-and-forth references, which
SXSSF wouldn't be able to do as it won't have the required objects available

It's possible that someone could do a minimal implementation that just did a
few updates on rows which were in the buffer in memory, but care would need to
be taken to ensure it cleanly throws an exception if it's asked to touch
anything outside of the buffer

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57844] SXSSFSheet.shiftRows() throws java.lang.RuntimeException: NotImplemented

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57844

--- Comment #2 from Michael <ms...@smart-solution.com> ---
I understand the complexity, but in this case Apache POI API better not to
offer and not to allow this method at all, rather then making impression that
user (developer) is able to insert row(s) and not allowing to do it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57844] SXSSFSheet.shiftRows() throws java.lang.RuntimeException: NotImplemented

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57844

--- Comment #4 from Javen O'Neal <on...@apache.org> ---
Added in r1717079.

I added an annotation org.apache.poi.util.NotImplemented which should be used
on any method, especially a public method, that is not implemented (either
because no one has gotten around to the work or the class inherently can't
support it but we want the method to be available in the interface so users can
write generic code.

I added these annotations on to the two shiftRows calls in SXSSFSheet.
Before this bug is closed, someone needs to search through the code for
RuntimeException, UnsupportedOperationException, NotImplemented, Not
Implemented and annotate those methods as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57844] SXSSFSheet.shiftRows() throws java.lang.RuntimeException: NotImplemented

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57844

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Dominik Stadler <do...@gmx.at> ---
I reviewed the SXSSF classes and added some more notes in r1738413, so this
should be mostly done now, any missing entries will be fixed as we go along.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57844] SXSSFSheet.shiftRows() throws java.lang.RuntimeException: NotImplemented

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57844

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 57844] SXSSFSheet.shiftRows() throws java.lang.RuntimeException: NotImplemented

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57844

--- Comment #3 from Javen O'Neal <on...@apache.org> ---
Proposed resolution:
Update the Java docs
(https://poi.apache.org/apidocs/org/apache/poi/xssf/streaming/SXSSFSheet.html)
and clearly state which functions are not implemented. (I'm guessing shiftRows
isn't the only SXSSF* function that throws
RuntimeException/UnsupportedOperationException("NotImplemented").

As Nick said, shiftRows could only work if the rows to be shifted are within
current window, rows that haven't yet been written probably wouldn't be able to
be shifted, and any reference (formula, named range, merged region, hyperlink,
chart data, tables, pivot tables, conditional formatting rules) that refers to
a shifted row would probably be broken.

If someone can find a workable solution that addresses these issues, we'd be
happy to implement it. Until then, the best we can do is advertise "Not
Implemented" in the java docs. I think it'd be a step backwards to move
shiftRows out of the Sheet interface so that SXSSFSheet isn't required to
implement it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org