timeplus-io / timeplus-cpp

Timeplus C++ client
Apache License 2.0
1 stars 0 forks source link

Some unit tests have failed since some data types are not yet supported by proton-server #3

Closed Jax-YHH closed 3 weeks ago

Jax-YHH commented 3 months ago
1
[  SKIPPED ] GenericColumnTest/30.NullableT_RoundTrip
2
[  SKIPPED ] Client/ClientCase.LowCardinalityString_AsString/0
[  SKIPPED ] Client/ClientCase.LowCardinalityString_AsString/1
3
[  SKIPPED ] Roundtrip/RoundtripCase.Point/0
[  SKIPPED ] Roundtrip/RoundtripCase.Point/1
[  SKIPPED ] Roundtrip/RoundtripCase.Point/2
[  SKIPPED ] Roundtrip/RoundtripCase.Ring/0
[  SKIPPED ] Roundtrip/RoundtripCase.Ring/1
[  SKIPPED ] Roundtrip/RoundtripCase.Ring/2
[  SKIPPED ] Roundtrip/RoundtripCase.Polygon/0
[  SKIPPED ] Roundtrip/RoundtripCase.Polygon/1
[  SKIPPED ] Roundtrip/RoundtripCase.Polygon/2
[  SKIPPED ] Roundtrip/RoundtripCase.MultiPolygon/0
[  SKIPPED ] Roundtrip/RoundtripCase.MultiPolygon/1
[  SKIPPED ] Roundtrip/RoundtripCase.MultiPolygon/2

2 low_cardinality(string) column values can not be INSERTed from client as ColumnString 2024.07.25 10:23:21.419784 [ 1810168 ] {119a13d5-18e1-4df7-b680-792fe680fbd5} : Logical error: 'Bad cast from type DB::ColumnString to DB::ColumnLowCardinality'.

3 point, ring, polygon multi_polygon are not yet supported by proton-server 2024.07.25 10:34:14.631465 [ 1820856 ] {a66074f5-f54c-459c-86d5-ef8908073e1d} executeQuery: Code: 50. DB::Exception: Unknown data type family: point. Maybe you meant: ['uint']. (UNKNOWN_TYPE) (version 2.3.3) (from 127.0.0.1:51442) (in query: CREATE TEMPORARY STREAM IF NOT EXISTS temporary_roundtrip_table (id uint32, col point) ENGINE = Memory;) ...

Jax-YHH commented 3 months ago
Yibo-Chen13 commented 3 weeks ago
  1. All nested types are not supported inside ColumnNullableT in proton server side(i.e. array, map, low_cardinality, tuple).That seem due to construction of ColumnNullable type in proton server:
/// file path: src/Columns/ColumnNullable.cpp
ColumnNullable::ColumnNullable(MutableColumnPtr && nested_column_, MutableColumnPtr && null_map_)
    : nested_column(std::move(nested_column_)), null_map(std::move(null_map_))
{
    // ....

    if (!getNestedColumn().canBeInsideNullable())
        throw Exception{getNestedColumn().getName() + " cannot be inside Nullable column", ErrorCodes::ILLEGAL_COLUMN};

    // ....
}

All nested types don't implement the canBeInsideNullable() interface, and it returns a false default.

  1. Now the Proton server supports casting from string type to low_cardinality type, and the client can use the ColumnString type to insert into the Proton server's LowCardinality(String) type. The same for fixed_string type.

  2. Proton server has disabled geometric types,so just skip test cases of geometric types now.