Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Body and row headers not displaying for Big Data
Body and row headers not displaying for Big Data [message #1769560] Tue, 01 August 2017 15:46 Go to next message
Wallace Lake is currently offline Wallace LakeFriend
Messages: 5
Registered: August 2017
Junior Member
Hi,

I ran into issues with the following code from Big Data example, while working on an empty Eclipse view plugin: (Note the value Integer.MAX_VALUE in the code)
Only the corner and the column headers are showing properly. The rest of the table is just empty in the widget background color.

public void createPartControl(Composite parent) {
	parent.setLayout(new GridLayout());
	DummyGridLayerStack layer = new DummyGridLayerStack(100, Integer.MAX_VALUE);

	// these 2 lines shouldn't make a difference
	DataLayer rowHeaderDataLayer = (DataLayer) layer.getRowHeaderDataLayer();
	rowHeaderDataLayer.setColumnWidthByPosition(0, 80);

	NatTable table = new NatTable(parent, layer);
	GridDataFactory.fillDefaults().grab(true, true).applyTo(table);
}


I tried reducing the rowCount value to 1 000 000 000, but with same empty body and row headers.

When I replace the rowCount value with 1147483647 (replaced the first digit of int_max with 1), the table seems to display as expected in the beginning.
However, after i scroll down with the slider thumb, I get StackOverflowError with the following console message:
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.StackOverflowError
	at org.eclipse.nebula.widgets.nattable.layer.DataLayer.getStartYOfRowPosition(DataLayer.java:473)
	at org.eclipse.nebula.widgets.nattable.layer.LayerUtil.findRowPosition(LayerUtil.java:64)
	at org.eclipse.nebula.widgets.nattable.layer.LayerUtil.findRowPosition(LayerUtil.java:73)
	at org.eclipse.nebula.widgets.nattable.layer.LayerUtil.findRowPosition(LayerUtil.java:73)
	...


or 2000000000:
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.StackOverflowError
	at org.eclipse.nebula.widgets.nattable.layer.SizeConfig.isAllPositionsSameSize(SizeConfig.java:472)
	at org.eclipse.nebula.widgets.nattable.layer.SizeConfig.getAggregateSize(SizeConfig.java:236)
	at org.eclipse.nebula.widgets.nattable.layer.DataLayer.getStartYOfRowPosition(DataLayer.java:473)
	at org.eclipse.nebula.widgets.nattable.layer.LayerUtil.findRowPosition(LayerUtil.java:64)
	at org.eclipse.nebula.widgets.nattable.layer.LayerUtil.findRowPosition(LayerUtil.java:73)
	at org.eclipse.nebula.widgets.nattable.layer.LayerUtil.findRowPosition(LayerUtil.java:73)
	...


I found a (maybe) related topic here, but it is stated as fixed.

If I further reduce the rowCount to 100 000 000 (or below), the table is working as expected again.

So my question is, is this a bug or a known limitation?

We had high hopes when we read the FAQ:
Quote:
How much data can you put behind it?
As much as you want, pretty much. The only practical limit right now is that the number of columns, rows, width and height of your table must be able to be represented as 32-bit integers. We test against virtual data sets of 1 million columns by 1 million rows.


We are hoping we can create a pull request or use a modified version that can support row limit of 64-bit integer.

Thanks
Re: Body and row headers not displaying for Big Data [message #1769679 is a reply to message #1769560] Wed, 02 August 2017 15:19 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I suppose you ran into a calculation overflow. The internal calculations are integer based. So the default row height of 20 pixels for max int rows causes an int overflow.

There was some work in the past to support even row objects in the long range. But it never was merged. It basically means to change API and calculations at several places.
Re: Body and row headers not displaying for Big Data [message #1769686 is a reply to message #1769560] Wed, 02 August 2017 15:51 Go to previous messageGo to next message
Wallace Lake is currently offline Wallace LakeFriend
Messages: 5
Registered: August 2017
Junior Member
I see, that makes sense.

Could you point me to the past efforts or give me pointers to where things need to be changed for supporting "long" rows?

This would be what we need to not implement ugly magic workarounds on top of NatTable and be able to make use of the many functionalities it provides.

Thanks
Re: Body and row headers not displaying for Big Data [message #1769689 is a reply to message #1769686] Wed, 02 August 2017 16:29 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I think this branch contains some of the changes https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?h=future

But it means breaking changes as several methods need to be changed.
Re: Body and row headers not displaying for Big Data [message #1769691 is a reply to message #1769689] Wed, 02 August 2017 16:58 Go to previous message
Wallace Lake is currently offline Wallace LakeFriend
Messages: 5
Registered: August 2017
Junior Member
Looks like exactly what I need, thanks.
Previous Topic:Dynamically create new row on commit last row's last cell's CellEditor
Next Topic:Enable cell decoration outside of editing mode
Goto Forum:
  


Current Time: Thu Mar 28 08:00:27 GMT 2024

Powered by FUDForum. Page generated in 0.02542 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top