Skip to content

Commit

Permalink
Remove Json type as unsupported (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkWanderer authored Mar 18, 2024
1 parent 61ff284 commit c2af127
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 44 deletions.
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,10 +8,6 @@ public enum Feature
{
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)
[SinceVersion("20.1")]
DateTime64 = 4,
Expand Down Expand Up @@ -46,10 +42,6 @@ public enum Feature
[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 @@ internal static string Format(ClickHouseType type, object value, bool quote)
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
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

0 comments on commit c2af127

Please sign in to comment.