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

Fix the problem of map(low_cardinality) and tuple(low_cardinality) #51

Merged
merged 4 commits into from
Jul 31, 2024

Conversation

Jasmine-ge
Copy link
Contributor

@Jasmine-ge Jasmine-ge commented Jul 30, 2024

Fix some of the existed problems of nested low_cardinality types. close #50

@Jasmine-ge Jasmine-ge requested a review from yl-lisen July 30, 2024 08:37
@Jasmine-ge Jasmine-ge self-assigned this Jul 30, 2024
@yl-lisen
Copy link

yl-lisen commented Jul 30, 2024

need revisit the interfaces:

/// only write column data
void Column::flushToSerializer()
{
    serializeBinaryBulkPrefix();
    serializeBinaryBulk();
    serializeBinaryBulkSuffix();
}
/// only read column data
Object[] DataType::readFromDeserializer()
{
    deserializeBinaryBulkPrefix();
    deserializeBinaryBulk();
    deserializeBinaryBulkSuffix();
}


/// write a column
serializer.writeUTF8StringBinary(column.name);
serializer.writeUTF8StringBinary(column.type.name());
column.flushToSerializer(serializer, true);


/// read a column:
String name = deserializer.readUTF8StringBinary();
String type = deserializer.readUTF8StringBinary();

IDataType dataType = DataTypeFactory.get(type, serverContext);
Object[] arr = dataType.readFromDeserializer(rowCnt, deserializer);
column = ColumnFactory.createColumn(name, dataType, arr);

@Jasmine-ge Jasmine-ge force-pushed the bugfix/issue-50-nested-type-lowcardinality-problem branch from 7157f59 to 4d5379c Compare July 31, 2024 03:21
@Jasmine-ge Jasmine-ge merged commit c57d951 into main Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem existed in nested LowCardinality types, like array(low_cardinality(...))
2 participants