On 2/26/07, Oleg Kobchenko <[EMAIL PROTECTED]> wrote:
Are there unit tests of samples for this class?
I don't know how to write portable instances of DataTable objects. (DataTable does not have a public constructor.) There's probably some way to do this (perhaps involving loading a DataSet from an xml file), but I don't know all the details. That said, some of the simpler conversions could be tested by pushing data from J through JConvert and comparing that result with 3!:1 inside J. (But I've not tried that, yet.)
If the data intended for J comes from the database, wouldn't be logical to use DataReader instead of DataTable, which created a second cache of the whole result in memory?
[1] An extra temporary in-memory copy is not necessarily anything worth agonizing over. [2] I imagine constructing portable unit tests involving DataReader would be even more problematic than constructing unit tests involving DataTable. [3] I think this would wind up being more complex to implement. (If nothing else, I think you wind up having to use GetSchemaTable to determine the basic structure of the table, so you wind up having to work with both an empty DataTable and the DataReader).
However, the logic will have to be regrouped to be able to fill separate columns in parallel.
Yes, that also.
Boxed result is interesting and J boxed arrays construction in .NET too. But it might be more efficient to use native homogenous .NET vectors for columns and pass them natively into J unboxed with fixing and SetM.
How do you make that work for strings (varchar columns)? Meanwhile, here's my current concerns: [A] I think I'm not always including the right amount of padding on my literal arrays. [B] I think I'm doing some needless copying of padding in some circumstances (because I'm copying entire byte arrays, rather than just the relevant bytes). I don't know if either of these are significant issues -- but I'll try to take a look at these tomorrow. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
