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

GH-38297: [C#] Fix build for .NET 4.7.2 #38299

Merged
merged 1 commit into from
Oct 16, 2023
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
4 changes: 4 additions & 0 deletions csharp/test/Apache.Arrow.Tests/DurationArrayTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ static TimeUnit RequiredPrecision(TimeSpan? timeSpan)
{
if (timeSpan == null) { return TimeUnit.Second; }
if ((timeSpan.Value.Ticks % TicksPerMicrosecond) > 0) { return TimeUnit.Nanosecond; }
#if NET5_0_OR_GREATER
if (timeSpan.Value.Microseconds > 0) { return TimeUnit.Microsecond; }
#else
if ((timeSpan.Value.Ticks % (TicksPerMicrosecond * 1000)) > 0) { return TimeUnit.Microsecond; }
#endif
if (timeSpan.Value.Milliseconds > 0) { return TimeUnit.Millisecond; }
return TimeUnit.Second;
}
Expand Down
6 changes: 3 additions & 3 deletions csharp/test/Apache.Arrow.Tests/MapArrayTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public void MapArray_Should_GetKeyValuePairs()
var keyBuilder = builder.KeyBuilder as StringArray.Builder;
var valueBuilder = builder.ValueBuilder as Int32Array.Builder;

KeyValuePair<string, int?> kv0 = KeyValuePair.Create("test", (int?)1);
KeyValuePair<string, int?> kv1 = KeyValuePair.Create("other", (int?)123);
KeyValuePair<string, int?> kv2 = KeyValuePair.Create("kv", (int?)null);
KeyValuePair<string, int?> kv0 = new KeyValuePair<string, int?>("test", (int?)1);
KeyValuePair<string, int?> kv1 = new KeyValuePair<string, int?>("other", (int?)123);
KeyValuePair<string, int?> kv2 = new KeyValuePair<string, int?>("kv", (int?)null);

builder.Append();
keyBuilder.Append("test");
Expand Down
Loading