Skip to content

Wrong INTEGER value was returned #156

Description

@h-serizawa

vertica-nodejs version: 1.1.4
Vertica Version: 25.3.0-0
Cluster: Single node

When executing the following statement, the wrong INTEGER value was returned. The value cast to VARCHAR was correct.

[Statement]
SELECT CAST(205900366134250666 AS VARCHAR) AS keyCast, 205900366134250666 AS keyOrig;

[JavaScript code]

import vertica from "vertica-nodejs";
const { Client } = vertica;

const client = new Client("vertica://dbadmin:@host:5433/dbname");
client.connect();
client.query("SELECT CAST(205900366134250666 AS VARCHAR) AS keyCast, 205900366134250666 AS keyOrig;", (err, res) => {
  console.log(err || res.rows[0]);
  client.end();
});

[Output]

# node main.js 
{ keyCast: '205900366134250666', keyOrig: 205900366134250660 }

Can you review this issue and fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions