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

ClickHouseColumn bug when parsing a tuple type #889

Closed
jnd77 opened this issue Apr 4, 2022 · 4 comments
Closed

ClickHouseColumn bug when parsing a tuple type #889

jnd77 opened this issue Apr 4, 2022 · 4 comments
Labels
Milestone

Comments

@jnd77
Copy link
Contributor

jnd77 commented Apr 4, 2022

Hi.
There is a bug or unexpected behavior in ClickHouseColumn when parsing a tuple type:

ClickHouseColumn.parse("col_name Tuple(s String, i Int64)") is throwing the following exception:

java.lang.IllegalArgumentException: Unknown data type: s String

My use case retrieves the types with a DESCRIBE TABLE query and parsing them via ClickHouseColumn.parse.

@zhicwu zhicwu added the bug label Apr 4, 2022
@zhicwu
Copy link
Contributor

zhicwu commented Apr 4, 2022

Thanks @jnd77, I'm aware of this. Actually it's been fixed in my local in order to support Object/JSON data type.

@jnd77
Copy link
Contributor Author

jnd77 commented Apr 4, 2022

Ok great. :)

@zhicwu
Copy link
Contributor

zhicwu commented Apr 4, 2022

ClickHouseColumn was enhanced to support both Object(a String, i Int64) and Tuple(a String, i Int64). However, as mentioned in ClickHouse/ClickHouse#35461, ClickHouse server will only return the latter even the column is defined as Object('JSON').

@zhicwu zhicwu added this to the 0.3.2-patch8 milestone Apr 4, 2022
@zhicwu zhicwu mentioned this issue Apr 4, 2022
10 tasks
@zhicwu zhicwu closed this as completed Apr 17, 2022
@zhicwu
Copy link
Contributor

zhicwu commented Apr 17, 2022

Looks like still have issue :<

-- not working
select tuple(1)::Tuple(i Int32)

-- workaround(longer field name)
select tuple(1)::Tuple(i1 Int32)

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