-
Notifications
You must be signed in to change notification settings - Fork 145
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
Support LowCardinality series datatype in getMetadata().getColumns() function #442
Comments
@pan3793 |
demetribu
added a commit
that referenced
this issue
Sep 22, 2023
demetribu
added a commit
that referenced
this issue
Sep 22, 2023
demetribu
added a commit
that referenced
this issue
Sep 23, 2023
demetribu
added a commit
that referenced
this issue
Sep 23, 2023
demetribu
added a commit
that referenced
this issue
Sep 23, 2023
sundy-li
pushed a commit
that referenced
this issue
Sep 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
c119dd5
Error logs
I encountered below exception when my code execute
connection.getMetaData().getColumns
jdbc function.Steps to reproduce
Create clickhouse table
Execute below ddl statement in
default
database to create a table with aLowCardinality(String)
datatype.Insert data
Insert some rows into this table
Create java demo
Create a java demo to test
getColumn()
function, and above exception occurs when running the demo.Other descriptions
I think this exception is because
SQLLexer.bareWord()
function will parse first alphabetic word as datatype. When given a data typeLowCardinality(String)
, then for-loop iteration in thebareWord
function will encounter first left bracket and return. So thatLowCardinality
will be regarded asdataTypeName
inIDataType<?, ?> get
function, and cannot be parsed as known data type.I think we can add a
LowCardinality
param check inpublic static IDataType<?, ?> get
function. We can check if current parseddataTypeName
isLowCardinality
. If so, we can makepos
cursor forward and return inner data type recursively. Examples below:Are there any suggestions? And if this issue is reasonable, I can also make a PR.
The text was updated successfully, but these errors were encountered: