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

Block structure mismatch on ClickHouseDatabaseMetaData.getFunctions #938

Closed
kassak opened this issue May 16, 2022 · 3 comments
Closed

Block structure mismatch on ClickHouseDatabaseMetaData.getFunctions #938

kassak opened this issue May 16, 2022 · 3 comments
Labels
Milestone

Comments

@kassak
Copy link

kassak commented May 16, 2022

Hi!
Our tests have caught the problem in DatabaseMetaData
The driver is 0.3.2-patch9

Code: 49, e.displayText() = DB::Exception: Block structure mismatch in Pipe::unitePipes stream: different number of columns:
FUNCTION_CAT Nullable(Nothing) Const(size = 0, Nullable(size = 1, Nothing(size = 1), UInt8(size = 1))), FUNCTION_SCHEM String Const(size = 0, String(size = 1)), FUNCTION_NAME String String(size = 0), REMARKS String String(size = 0), FUNCTION_TYPE UInt8 UInt8(size = 0), SPECIFIC_NAME String String(size = 0), NULL Nullable(Nothing) Const(size = 0, Nullable(size = 1, Nothing(size = 1), UInt8(size = 1))), 'system' String Const(size = 0, String(size = 1)), 'case-sensistive table function' String Const(size = 0, String(size = 1)), 2 UInt8 Const(size = 0, UInt8(size = 1))
FUNCTION_CAT Nullable(Nothing) Const(size = 0, Nullable(size = 1, Nothing(size = 1), UInt8(size = 1))), FUNCTION_SCHEM String Const(size = 0, String(size = 1)), FUNCTION_NAME String String(size = 0), REMARKS String String(size = 0), FUNCTION_TYPE UInt8 UInt8(size = 0), SPECIFIC_NAME String String(size = 0), NULL Nullable(Nothing) Const(size = 0, Nullable(size = 1, Nothing(size = 1), UInt8(size = 1))), 'system' String Const(size = 0, String(size = 1)), 1 UInt8 Const(size = 0, UInt8(size = 1)) (version 21.6.5.37 (official build))
, server ClickHouseNode(addr=http:localhost/<unresolved>:8126, db=default)@-279499002
java.sql.SQLException: Code: 49, e.displayText() = DB::Exception: Block structure mismatch in Pipe::unitePipes stream: different number of columns:
FUNCTION_CAT Nullable(Nothing) Const(size = 0, Nullable(size = 1, Nothing(size = 1), UInt8(size = 1))), FUNCTION_SCHEM String Const(size = 0, String(size = 1)), FUNCTION_NAME String String(size = 0), REMARKS String String(size = 0), FUNCTION_TYPE UInt8 UInt8(size = 0), SPECIFIC_NAME String String(size = 0), NULL Nullable(Nothing) Const(size = 0, Nullable(size = 1, Nothing(size = 1), UInt8(size = 1))), 'system' String Const(size = 0, String(size = 1)), 'case-sensistive table function' String Const(size = 0, String(size = 1)), 2 UInt8 Const(size = 0, UInt8(size = 1))
FUNCTION_CAT Nullable(Nothing) Const(size = 0, Nullable(size = 1, Nothing(size = 1), UInt8(size = 1))), FUNCTION_SCHEM String Const(size = 0, String(size = 1)), FUNCTION_NAME String String(size = 0), REMARKS String String(size = 0), FUNCTION_TYPE UInt8 UInt8(size = 0), SPECIFIC_NAME String String(size = 0), NULL Nullable(Nothing) Const(size = 0, Nullable(size = 1, Nothing(size = 1), UInt8(size = 1))), 'system' String Const(size = 0, String(size = 1)), 1 UInt8 Const(size = 0, UInt8(size = 1)) (version 21.6.5.37 (official build))
, server ClickHouseNode(addr=http:localhost/<unresolved>:8126, db=default)@-279499002
	at com.clickhouse.jdbc.SqlExceptionUtils.handle(SqlExceptionUtils.java:55)
	at com.clickhouse.jdbc.SqlExceptionUtils.handle(SqlExceptionUtils.java:70)
	at com.clickhouse.jdbc.ClickHouseDatabaseMetaData.query(ClickHouseDatabaseMetaData.java:74)
	at com.clickhouse.jdbc.ClickHouseDatabaseMetaData.query(ClickHouseDatabaseMetaData.java:52)
	at com.clickhouse.jdbc.ClickHouseDatabaseMetaData.getFunctions(ClickHouseDatabaseMetaData.java:1272)

Difference is 'case-sensistive table function'

@zhicwu
Copy link
Contributor

zhicwu commented May 16, 2022

Thanks @kassak but I'm not sure what the issue is. Could you elaborate? Does the same issue exist on newer version of ClickHouse like 22.3? If you can share the test, I can add it for regression.

@kassak
Copy link
Author

kassak commented May 20, 2022

The issue is the exception thrown on ClickHouseDatabaseMetaData.getFunctions call :)
Sorry the test is the part of our integration tests. I think just calling that method is enough to fail.
I've checked, that works on 22 server

@zhicwu
Copy link
Contributor

zhicwu commented May 20, 2022

Thanks @kassak. I hope it's not related to the typo, which has been fixed on develop branch. Will try to reproduce the issue on 21.6.

@zhicwu zhicwu added the bug label May 23, 2022
@zhicwu zhicwu added this to the 0.3.2-patch10 milestone May 23, 2022
@zhicwu zhicwu closed this as completed Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants