GithubHelp home page GithubHelp logo

Comments (13)

doom369 avatar doom369 commented on June 9, 2024 1

@xadhatter cool. We just released version 1.4.4. Thanks again for the details.

from clickhouse4j.

doom369 avatar doom369 commented on June 9, 2024

@kirill3000 Hello. Could you please provide more info. What operation is performed? What tool are you using? Maybe some logs?

from clickhouse4j.

doom369 avatar doom369 commented on June 9, 2024

@kirill3000 Closing due to lack of info. Please reopen when you can provide more info.

from clickhouse4j.

xadhatter avatar xadhatter commented on June 9, 2024

Hey @doom369 I am getting this error as well when using Tableau Desktop v2019.1.12 from a Windows machine. It only occurs on tables that have a Date datatype, DateTime works fine. I get the same error message using the official Yandex JDBC driver as well. Hitting ClickHouse server version 20.1.3.7.

I don't see anything useful in the logs other than the error message provided. Any help would be greatly appreciated. The driver is working great otherwise, thanks for all the hard work!

*edited to add ClickHouse server version

from clickhouse4j.

doom369 avatar doom369 commented on June 9, 2024

@xadhatter thanks for the details. Do you have some log of queries that Tableau performs? I would like to know what exactly query Tableau perform when it fails. It will help a lot.

from clickhouse4j.

xadhatter avatar xadhatter commented on June 9, 2024

@doom369 , here is my test setup:

CREATE TABLE test (
	id UInt32,
	date Date
)
ENGINE = MergeTree()
ORDER BY (id);

INSERT INTO test VALUES (0, '2020-01-01');

And the query that is coming from Tableau:

SELECT
	TOP 1000 1 AS `Number_of_Records`,
	`test`.`date` AS `date`,
	`test`.`id` AS `id`
FROM
	`default`.`test` `test`

If I plug that query into DBeaver using your driver it works fine. So I assume Tableau is calling some method in the JDBC driver to deal with the Date field that isn't implemented yet. I'll try to get the stack trace for you.

from clickhouse4j.

doom369 avatar doom369 commented on June 9, 2024

@xadhatter date is implemented within driver, so that's why I need precise method call to look into. If you don't know where to look in the Tableau - you can take a look into Clickhouse log:

/var/log/clickhouse-server/clickhouse-server.log
or here
/var/log/clickhouse-server/clickhouse-server.err.log

Those logs will tell you about queries that are executed and thus we will know what causes the issue. I'm eager to help, but need some entry point to start.

One more thing - clickhouse driver is not fully implemented and it has ~ 30 methods that throw UnsupportedOperationException. So precise method will help.

from clickhouse4j.

xadhatter avatar xadhatter commented on June 9, 2024

@doom369 Thanks so much for the fast responses. The query above is the exact query that Tableau is making. No errors on the clickhouse side.

Tableau is a bit of a black box, gotta love debugging closed source software. Here is the exact log coming out from Tableau...

{
    "ts": "2020-02-10T10:31:41.783",
    "pid": 8968,
    "tid": "2138",
    "sev": "warn",
    "req": "-",
    "sess": "-",
    "site": "-",
    "user": "-",
    "k": "compute-task-error",
    "v": {
        "msg": "java.lang.UnsupportedOperationException\nThere was a Java error.\n",
        "stack": "disabled",
        "task-name": "class BuildDataSourcePresModelTask"
    }
}

I'm trying to figure out how to enable "stack" which I hope will give us the Java stacktrace and the exact method, to make your life waay too easy ;) but struggling. I will reach out to Tableau support shortly if I can't figure it out.

from clickhouse4j.

xadhatter avatar xadhatter commented on June 9, 2024

@doom369 I've opened a support ticket with Tableau. I'll keep you posted.

from clickhouse4j.

xadhatter avatar xadhatter commented on June 9, 2024

@doom369 I win! Did a dirty hack:

try {
	throw new UnsupportedOperationException();
} catch (UnsupportedOperationException ex) {
	try (PrintWriter pw = new PrintWriter("C:\\Users\\xadhatter\\Downloads\\jdbcerror.log")) {
		ex.printStackTrace(pw);
	} catch (FileNotFoundException e) { }
	throw ex;
}

...and got...

java.lang.UnsupportedOperationException
	at cc.blynk.clickhouse.response.AbstractResultSet.getDate(AbstractResultSet.java:1864)
	at com.tableausoftware.data.ProtobufResultSet.addValue(ProtobufResultSet.java:268)
	at com.tableausoftware.data.ProtobufResultSet.addRow(ProtobufResultSet.java:202)
	at com.tableausoftware.data.ProtobufResultSet.fetchRows(ProtobufResultSet.java:154)
	at com.tableausoftware.data.ProtobufResultSet.nextBlock(ProtobufResultSet.java:179)

from clickhouse4j.

xadhatter avatar xadhatter commented on June 9, 2024

Realized the line numbers will be off. It's this method, https://github.com/blynkkk/clickhouse4j/blob/master/src/main/java/cc/blynk/clickhouse/response/AbstractResultSet.java#L641

from clickhouse4j.

doom369 avatar doom369 commented on June 9, 2024

@xadhatter pushed the fix and made temporary build:

https://github.com/blynkkk/clickhouse4j/releases/download/clickhouse4j-1.4.3/clickhouse4j-1.4.4-SNAPSHOT.jar

Please let me know if it works.

from clickhouse4j.

xadhatter avatar xadhatter commented on June 9, 2024

@doom369 It works! Thanks so much for the speedy fix. I'm new to ClickHouse but really liking it. Nice to see such a great community forming around it.

from clickhouse4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.