feat: Add ParquetReader/Writer streams

This commit is contained in:
John Colvin committed 2025-12-05 15:56:23 +00:00
1 parent dd136afad7
commit 5f4a811598
28 files changed
+2050 -5

No files matched your search

@@ -0,0 +1,34 @@
#nullable enable
namespace Bts.DataStreamCore;
using BCG;
using Spark.Core.Collections;
using System;
using System.Collections.Generic;
public static class BlueColumnValueCollection {
public static BlueColumnValueCollection<T> Create<T>(IBlueRowCollection rows, int columnIndex, Func<object?, T> convert) =>
new(rows, columnIndex, convert);
}
public class BlueColumnValueCollection<T> : IMutableCollectionFacade<T> {
readonly IBlueRowCollection rows;
readonly int columnIndex;
readonly Func<object?, T> convert;
public BlueColumnValueCollection(IBlueRowCollection rows, int columnIndex, Func<object?, T> convert) {
this.rows = rows;
this.columnIndex = columnIndex;
this.convert = convert;
}
public int Count => rows.Count;
public IEnumerator<T> GetEnumerator() {
foreach (IBlueRow r in rows) {
yield return convert(r[columnIndex]);
}
}
}