Error querying 'Tuple' type
I used Dbeaver to query my ClickHouse database and the following type of columns exist in a particular table.
dataType
Tuple(s String, i Int64)
When I query the table in my C# application I am prompted with the error.
System.ArgumentException: 'Unknown type: s String'
The code that went wrong is in the TypeConverter, as follows.
internal static ClickHouseType ParseClickHouseType(SyntaxTreeNode node)
{
if (node.ChildNodes.Count == 0 && SimpleTypes.TryGetValue(node.Value, out var typeInfo))
{
return typeInfo;
}
if (ParameterizedTypes.ContainsKey(node.Value))
{
return ParameterizedTypes[node.Value].Parse(node, ParseClickHouseType);
}
throw new ArgumentException("Unknown type: " + node.ToString());
}
Error when node.Value is equal to 's String'.
@DarkWanderer
@jinwenjie98 what was the raw output from clickhouse that was being parsed? (Probably also worth asking what version of clickhouse servers running too)
Testing it with multiple int types around the same output you've added above it seems to work as expected https://github.com/ChrisMcKee/ClickHouse.Client/blob/82190307b0bddc4d4d2ea37388a730266de880bc/ClickHouse.Client.Tests/ADO/DataReaderTests.cs#L145-L166
Reproduces with latest ClickHouse in var schema = connection.GetSchema("Columns", new[] { "system" });
Fixed in 6.3.0, please comment/reopen if reoccurs