Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column Header coming with trailing spaces in compiled version of MonetDB 11.27.9/11 #6507

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2018-01-06 09:00:17 +0100
From: Sreejith Sharma <<sreejith.sharma>>
To: clients devs <>
Version: 11.27.9 (Jul2017-SP2)

Last updated: 2018-03-29 15:39:09 +0200

Comment 26057

Date: 2018-01-06 09:00:17 +0100
From: Sreejith Sharma <<sreejith.sharma>>

User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Build Identifier:

SQL> SELECT SUM("TABLE_NAME".COLUMN_NAME) FROM "TABLE_NAME";
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| L3 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 79892245957480 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
SQLRowCount returns 1
1 rows fetched

MonetDB 5 server v11.27.9 "Jul2017-SP2" (64-bit, 128-bit integers)

Compiler Details:
configure:5030: checking for C compiler version
configure:5039: gcc --version >&5
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)

define PACKAGE_NAME "MonetDB"
| define PACKAGE_TARNAME "MonetDB"
| define PACKAGE_VERSION "11.27.9"
| define PACKAGE_STRING "MonetDB 11.27.9"

Reproducible: Always

Steps to Reproduce:

1.Compile the source code build with above compiler details and use any ODBC client with sample SQL provided
2.
3.

Actual Results:

SQL> SELECT SUM("TABLE_NAME".COLUMN_NAME) FROM "TABLE_NAME";
+---------------------+
| L3 |
+---------------------+
| 79892245957480 |
+---------------------+

Expected Results:

SQL> SELECT SUM("TABLE_NAME".COLUMN_NAME) FROM "TABLE_NAME";
+---------------------+
| L3 |
+---------------------+
| 79892245957480 |
+---------------------+

Comment 26147

Date: 2018-01-31 16:17:39 +0100
From: MonetDB Mercurial Repository <>

Changeset 5a253ae53941 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=5a253ae53941

Changeset description:

Initial support for HUGEINT in the ODBC driver.
This fixes bug #6507.

Comment 26148

Date: 2018-01-31 16:24:43 +0100
From: @sjoerdmullender

I have implemented support for getting values of type HUGEINT from the server, however at the application end of things, nothing has changed. This means that if the server sends a value of type HUGEINT and that value is too large for a 64 bit integer, you cannot retrieve it as an integer. You can, however, retrieve it as a string (SQL_C_CHAR or SQL_C_WCHAR).
Values of type HUGEINT that do fit in 64 bits can be retrieved into a 64 bit integer (SQL_C_BIGINT).

This is implemented in the default branch, meaning it will be in the next feature release.

Before (using isql from UNIXodbc):
SQL> select sum(id) from tables;
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| L41 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 340669 |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

After:
SQL> select sum(id) from tables;
+-----------------------------------------+
| L41 |
+-----------------------------------------+
| 387258 |
+-----------------------------------------+

(different server, so different numeric values, but those are not the point.)

Comment 26304

Date: 2018-03-29 15:39:09 +0200
From: @sjoerdmullender

The Mar2018 version has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant