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

ClientV2 ignoring schema inference hints and infer integer settings #1884

Open
alxhill opened this issue Oct 24, 2024 · 1 comment
Open

ClientV2 ignoring schema inference hints and infer integer settings #1884

alxhill opened this issue Oct 24, 2024 · 1 comment

Comments

@alxhill
Copy link
Contributor

alxhill commented Oct 24, 2024

Describe your feedback

We run the following query through the clickhouse java client:

CREATE TABLE {tmpTableName:Identifier}  ENGINE=Log() AS SELECT * FROM s3('...file.csv', 'CSVWithNames')

With the following QuerySettings:

date_time_input_format=best_effort,
input_format_try_infer_integers=0,
schema_inference_hints='timestamp Nullable(Float64)'
input_format_try_infer_exponent_floats=1,
precise_float_parsing=1,
input_format_try_infer_dates=1,
input_format_try_infer_datetimes=1,
schema_inference_use_cache_for_s3=0,
schema_inference_make_columns_nullable=1

In ClientV1, the created table would have Nullable(Float64) for the timestamp column. ClientV2 seems to ignore the inference hints (and the "input_format_try_infer_integers=0" setting), as the column is Nullable(Int64) instead:

TableSchema{tableName='tmp_csv_0be155a3_920d_4496_87a7_ee2facee2efc', databaseName='nominal', columns=[timestamp Nullable(Int64), a Nullable(Float64), b Nullable(String)], metadata={a={type=Nullable(Float64)}, b={type=Nullable(String)}, timestamp={type=Nullable(Int64)}}, colIndex={a=1, b=2, timestamp=0}, hasDefaults=false}
@chernser
Copy link
Contributor

@alxhill thank you for reporting!
will look into it shortly.

@chernser chernser added the bug label Oct 25, 2024
@chernser chernser added this to the 0.7.2 milestone Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants