-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Okay, this is quite severe and a show-stopper for us. Resolution would be appreciated.
It only happens with a larger Long values, e.g. 2000000000L. Smaller values are fine, e.g 498498L, but this makes it even more dangerous.
Tested on Mac OS X and Linux, VoltDB 3.7.0.4-0 enterprise. Node.js v0.10.15 (Mac) and v0.10.24 (Linux).
Minimal test case follows.
Test.java
package yourpackage;
import org.voltdb.*;
public class Test extends VoltProcedure {
public VoltTable[] run() {
VoltTable test = new VoltTable(
new VoltTable.ColumnInfo("test", VoltType.BIGINT));
test.addRow(2000000000L);
return new VoltTable[] { test };
}
}catalog.sql
create procedure from class yourpackage.Test;test.js
var client = require('voltjs/lib/client');
var configuration = require('voltjs/lib/configuration');
var query = require('voltjs/lib/query');
var cfg = new configuration();
cfg.host = '127.0.0.1';
cfg.messageQueueSize = 0;
var client = new client([ cfg ]);
client.connect(function(err, event, results) {
var test = new query('Test', []);
var testQuery = test.getQuery();
testQuery.setParameters([]);
client.callProcedure(testQuery, function(err, event, results) {
// EXPECTED: 2000000000 ACTUAL: 120951808
console.dir(results.table[0][0].test);
process.exit(0);
});
});(@jpiekos - John, I'm still intent on sending you that proposal, just haven't had time by now.)
Metadata
Metadata
Assignees
Labels
No labels