Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
aloneguid committed Dec 13, 2023
2 parents ff0cdd1 + 4edf100 commit 0252f12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ obj/
BenchmarkDotNet.Artifacts/
*.swp
Parquet.sln.DotSettings.user
.DS_Store
10 changes: 10 additions & 0 deletions src/Parquet/Extensions/StringBuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using System.Text;
using Parquet.Rows;
using Parquet.Schema;
Expand Down Expand Up @@ -120,6 +121,15 @@ private static void EncodeJson(StringBuilder sb, StringFormat sf, object? value)
sb.Append(quote);
sb.Append(Convert.ToBase64String((byte[])value));
sb.Append(quote);
}
else if(t == typeof(decimal)) {
sb.Append(((decimal)value).ToString(CultureInfo.InvariantCulture));
}
else if(t == typeof(float)) {
sb.Append(((float)value).ToString(CultureInfo.InvariantCulture));
}
else if(t == typeof(double)) {
sb.Append(((double)value).ToString(CultureInfo.InvariantCulture));
}
else {
sb.Append(value.ToString());
Expand Down

0 comments on commit 0252f12

Please sign in to comment.