Closed perNyfelt closed 2 years ago
I change the JDBCUtils in RJDBC to do
StringVector vec = new StringArrayVector(rowNames);
dataFrame.setAttribute("row.names", vec);
...which seems to work fine.
I had an older version of renjin-dbi and see that this is already resolved in a similar way (with new ConvertingStringVector(IntSequence.fromTo(1, rows))). So this must be the intended behavior.
In v0.9.2726 (and beta-76) the RowNamesVector had several more constructors then what is in master. The RJDBC package for instance uses the
RowNamesVector(int numRows)
constructor which is no longer available in master. The odd thing is that the RowNamesVector in master looks just like it used to do a long time ago, before 792d81735d1f80d48eee0964322715ebc4c7f502 commited on 1/5/20 by Alex. It is almost that some old code snuck back in - or maybe it was intentional.The RowNamesVector currently looks like this: https://github.com/bedatadriven/renjin/blob/master/core/src/main/java/org/renjin/primitives/vector/RowNamesVector.java
But the v0.9.2726 version looks like this: https://github.com/bedatadriven/renjin/blob/v0.9.2726/core/src/main/java/org/renjin/primitives/vector/RowNamesVector.java
Could anyone in the know comment on whether this is intentional or a mistake?