ClickHouse / ClickHouse/clickhouse-java

When serialize FixedString and string is bigger than size defined in Table definition

Open
#2,223 3 comments 0 reactions 0 assignees View on GitHub
area:data-type client-api-v2 v2-feedback
Dominant language
Java
Stars
1.6k
Forks
636
Avg merge
2d 16h
Merged PRs (30d)
28

Description

### Describe your feedback
Currently, the behavior is that if the string that is sent to serialize is bigger, we send only the length defined in the table schema.

A good approach is to have a flag that indicates if it's a bigger throw Exception or send only a string of a defined size.

### Code example
How it's done today
writeFixedString only what is needed.
```java
BinaryStreamUtils.writeFixedString(stream, convertToString(value), column.getPrecision());
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.