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

Remove Json type as unsupported #448

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ClickHouse.Client.Tests/BulkCopyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public async Task ShouldExecuteMultipleBulkInsertions()
BatchSize = 100
};

await bulkCopy.InitAsync();
await bulkCopy.WriteToServerAsync(Enumerable.Repeat(new[] { (object)0 }, 1));
i++;
}
Expand Down Expand Up @@ -187,7 +188,6 @@ public async Task ShouldExecuteBulkInsertWithComplexColumnName(string columnName
}

[Test]
[RequiredFeature(Feature.InlineQuery)]
public async Task ShouldInsertIntoTableWithLotsOfColumns()
{
var tableName = "test.bulk_long_columns";
Expand Down
5 changes: 0 additions & 5 deletions ClickHouse.Client.Tests/TestUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,6 @@ public static IEnumerable<DataTypeSample> GetDataTypeSamples()
Tuple.Create(.3, .4)
});

if (SupportedFeatures.HasFlag(Feature.Json))
{
//yield return new DataTypeSample("Json", typeof(string), "'{\"a\": \"b\", \"c\": 3}'", "{\"a\": \"b\", \"c\": 3}");
}

if (SupportedFeatures.HasFlag(Feature.Variant))
{
yield return new DataTypeSample("Variant(UInt64, String, Array(UInt64))", typeof(string), "'Hello, World!'::Variant(UInt64, String, Array(UInt64))", "Hello, World!");
Expand Down
8 changes: 0 additions & 8 deletions ClickHouse.Client/ADO/Feature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@
{
None = 0, // Special value

[Obsolete]
[SinceVersion("20.5")]
InlineQuery = 2,

[Obsolete]

Check warning on line 11 in ClickHouse.Client/ADO/Feature.cs

View workflow job for this annotation

GitHub Actions / Short

Provide a message for the ObsoleteAttribute that marks DateTime64 as Obsolete (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041)

Check warning on line 11 in ClickHouse.Client/ADO/Feature.cs

View workflow job for this annotation

GitHub Actions / Short

Provide a message for the ObsoleteAttribute that marks DateTime64 as Obsolete (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041)
[SinceVersion("20.1")]
DateTime64 = 4,

[Obsolete]

Check warning on line 15 in ClickHouse.Client/ADO/Feature.cs

View workflow job for this annotation

GitHub Actions / Short

Provide a message for the ObsoleteAttribute that marks Decimals as Obsolete (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041)

Check warning on line 15 in ClickHouse.Client/ADO/Feature.cs

View workflow job for this annotation

GitHub Actions / Short

Provide a message for the ObsoleteAttribute that marks Decimals as Obsolete (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041)
[SinceVersion("20.0")]
Decimals = 8,

[Obsolete]

Check warning on line 19 in ClickHouse.Client/ADO/Feature.cs

View workflow job for this annotation

GitHub Actions / Short

Provide a message for the ObsoleteAttribute that marks IPv6 as Obsolete (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041)

Check warning on line 19 in ClickHouse.Client/ADO/Feature.cs

View workflow job for this annotation

GitHub Actions / Short

Provide a message for the ObsoleteAttribute that marks IPv6 as Obsolete (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041)
[SinceVersion("20.0")]
IPv6 = 16,

Expand All @@ -39,17 +35,13 @@
[SinceVersion("21.9")]
WideTypes = 512,

[Obsolete]

Check warning on line 38 in ClickHouse.Client/ADO/Feature.cs

View workflow job for this annotation

GitHub Actions / Short

Provide a message for the ObsoleteAttribute that marks Geo as Obsolete (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041)

Check warning on line 38 in ClickHouse.Client/ADO/Feature.cs

View workflow job for this annotation

GitHub Actions / Short

Provide a message for the ObsoleteAttribute that marks Geo as Obsolete (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041)
[SinceVersion("20.5")]
Geo = 1024,

[SinceVersion("22.6")]
Stats = 2048,

[Obsolete]
[SinceVersion("22.6")]
Json = 4096,

[SinceVersion("22.8")]
AsyncInsert = 8192,

Expand Down
1 change: 0 additions & 1 deletion ClickHouse.Client/Formats/HttpParameterFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
case IPv4Type ip4:
case IPv6Type ip6:
case UuidType uuidType:
case JsonType jsonType:
return quote ? value.ToString().Escape().QuoteSingle() : value.ToString().Escape();

case LowCardinalityType lt:
Expand Down Expand Up @@ -91,7 +90,7 @@
return $"{{{string.Join(",", strings)}}}";

case VariantType variantType:
var (_,chType) = variantType.GetMatchingType(value);

Check warning on line 93 in ClickHouse.Client/Formats/HttpParameterFormatter.cs

View workflow job for this annotation

GitHub Actions / Short

Check warning on line 93 in ClickHouse.Client/Formats/HttpParameterFormatter.cs

View workflow job for this annotation

GitHub Actions / Short

return Format(chType, value, quote);

default:
Expand Down
28 changes: 0 additions & 28 deletions ClickHouse.Client/Types/JsonType.cs

This file was deleted.

1 change: 0 additions & 1 deletion ClickHouse.Client/Types/TypeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ static TypeConverter()
RegisterPlainType<MultiPolygonType>();

// JSON/Object
RegisterPlainType<JsonType>();
RegisterParameterizedType<ObjectType>();

// Mapping fixups
Expand Down
Loading