mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

Support for non-numeric measure values. #147

Closed alegiuliani closed 10 years ago

alegiuliani commented 10 years ago

I'm facing a problem with Date parser. There is a measure that give the value "11/12/2013 00:00:00", but I got the following error:

Caused by: java.lang.NumberFormatException: For input string: "2013-12-11T00:00:00" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222) at java.lang.Double.valueOf(Double.java:475) at org.olap4j.driver.xmla.XmlaOlap4jCell.getDoubleValue(XmlaOlap4jCell.java:92) at org.pivot4j.ui.table.TableRenderer.getValue(TableRenderer.java:204) at org.pivot4j.ui.table.TableRenderer.renderDataRow(TableRenderer.java:697)

My suggestion is to postpone the decision of what type the cell value must be formatted. The getValue method is already a protected method, so it still will be used.

mysticfall commented 10 years ago

I believe this is the same one with this issue :

It seems it'd be better if I'll just assume cell values can legitimately contain non-numeric values and change the relevant code accordingly. I'll apply the change in a day or two.

Thanks for the reporting!

alegiuliani commented 10 years ago

Hi Xavier,

Yes, it's look like the same error. I didn't pay due attention, an just now I realize that. Sorry.

Sent from my iPad

On 17/04/2014, at 16:16, Xavier Cho notifications@github.com wrote:

I believe this is the same one with this issue :

https://groups.google.com/d/msg/pivot4j-list/VBxfOM5AvK0/yzXCDAQUfG0J It seems it'd be better if I'll just assume cell values can legitimately contain non-numeric values and change the relevant code accordingly. I'll apply the change in a day or two.

Thanks for the reporting!

— Reply to this email directly or view it on GitHub.

alegiuliani commented 10 years ago

Xavier,

Tested & Approved!

Thanks!