feat: Add DiffStream to compute row diffs (like pandas)
This commit is contained in:
1 parent
18b19ac787
commit
4db9cdd357
5 files changed
+276
-2
No files matched your search
@@ -1,4 +1,6 @@
|
||||
#nullable enable
|
||||
using bts;
|
||||
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@@ -7,7 +9,7 @@ namespace BCG {
|
||||
/// Resprsents information about a column schema, ie its ordinal, the type, the name and constant value or expression. where applicable
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ColumnInfo : IEquatable<ColumnInfo>, IComparable<ColumnInfo>, IComparable {
|
||||
public class ColumnInfo : IEquatable<ColumnInfo>, IComparable<ColumnInfo>, IComparable, ICloneable<ColumnInfo> {
|
||||
|
||||
//the default column info does not cach values in a lookup table, therefore it is in group 0
|
||||
public ColumnInfo(string colName, int colNo, Type colType, object? colValue = null) {
|
||||
@@ -22,6 +24,8 @@ namespace BCG {
|
||||
}
|
||||
|
||||
public static bool isAllowedType(Type type) =>
|
||||
type == typeof(bool) ||
|
||||
type == typeof(byte) ||
|
||||
type == typeof(int) ||
|
||||
type == typeof(long) ||
|
||||
type == typeof(double) ||
|
||||
@@ -34,6 +38,9 @@ namespace BCG {
|
||||
public int CompareTo(object? obj) =>
|
||||
CompareTo(obj as ColumnInfo);
|
||||
|
||||
public ColumnInfo Clone() =>
|
||||
new(colName, colNo, colType);
|
||||
|
||||
public bool Equals(ColumnInfo? other) =>
|
||||
other is not null
|
||||
&& colNo == other.colNo
|
||||
|
||||
Reference in new issue
Block a user