Bug: Query returns nulls in DBeaver and not other clients
See original GitHub issueThe following query returns nulls in DBeaver but not other clients
select
t.*,
CAST( CAST(t.date_key AS CHAR(8)) AS DATE FORMAT 'YYYYMMDD')
from schema.test_table as t
looking at the tooltip it looks like dbeaver is confused on the type of the result given that its showing the datetime icon but hovering says integer?
CREATE MULTISET TABLE schema.test_table ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
date_key INTEGER NOT NULL
)
no primary index;
insert into schema.test_table values (20100101);
insert into schema.test_table values (20100102);
insert into schema.test_table values (20100103);
insert into schema.test_table values (20100104);
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Null pointer exception with BIGQUERY (some SQL formatting)
Hi, I am connecting to bigquery using community edition of dbeaver. I am getting Null pointer exception when I try to execute the...
Read more >DBeaver throws SQL error when query contains empty lines
Re: DBeaver throws SQL error when query contains empty lines ... Actually it is not a bug. DBeaver has two modes of SQL...
Read more >Connect DBeaver to BigQuery through ODBC - Google Cloud
Connect and access BigQuery data. After the DSN is configured, run DBeaver Community. Create a new database connection. Click New Database ...
Read more >Connect to BigQuery Data in DBeaver - CData Software
Use the CData ODBC Driver to connect to BigQuery data in DBeaver. The CData ODBC Driver for BigQuery enables access to live data...
Read more >Connecting to Google BigQuery with DBeaver with JDBC ...
Note there are 4 different ways to connect to BigQuery using the JDBC driver. This tutorial illustrates connecting using the service account ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is what causes problem with date values:
DBeaver thinks that this column has numeric data type. This is because you second column has the same alias as the real table column (date_key). DBeaver tries to discover real attribute data type from database metadata whenever it is possible. Smarty pants.
Workaround - set some alias for your expression. And I’ll think how to handle this problem better…
makes sense… given that here is code that reproduces the issue in oracle