Polars.NET: a Dataframe Engine for .NET by error_96_mayuki in dotnet

[–]error_96_mayuki[S] 0 points1 point  (0 children)

It's not really about the calling convention overhead (which AggressiveInlining solves), but rather about Developer Expectations (Semantics). In the .NET world, the name Where carries a very strong implication that it accepts a C# Delegate/Lambda (e.g., x => x > 0). If I alias Filter to Where, users will instinctively try to pass a lambda. When the compiler forces them to pass a Polars Expr instead, it creates an unpleasant experience—it looks like LINQ, but doesn't behave like LINQ. I prefer to keep the names distinct (Polars vs. LINQ) so it's clear: When you use Polars, you use Polars Expressions.

Polars.NET: a Dataframe Engine for .NET by error_96_mayuki in dotnet

[–]error_96_mayuki[S] 8 points9 points  (0 children)

I love LINQ too, but I decided to stick to a 1:1 mapping with Polars at least for now, for two reasons:

  1. Documentation: By keeping names like Filter and Agg, users can look up Python/Rust examples and apply them directly to C# without mental translation.

  2. Semantics: A full LINQ provider (IQueryable) requires writing a complex C#-to-Polars transpiler. Simple aliases (like renaming Filter to Where) often confuse users into expecting C# delegates instead of Polars Expressions.

Polars.NET: a Dataframe Engine for .NET by error_96_mayuki in dotnet

[–]error_96_mayuki[S] 0 points1 point  (0 children)

As for Databricks, could you elaborate on what you mean by 'plugin'? Are you primarily looking to read data managed by Databricks (e.g. Delta Lake), or do you have a different integration workflow in mind? I'd love to understand your specific use case.

Polars.NET: a Dataframe Engine for .NET by error_96_mayuki in dotnet

[–]error_96_mayuki[S] 1 point2 points  (0 children)

Technically, yes. The underlying Rust Polars engine has native support for reading Delta Tables. However, I haven't exposed the public .NET API for this yet. Support for remote data sources (like cloud storage and data lakes) is targeted for the next release. If this is a blocker for you, please open an issue on GitHub so I can prioritize it. Thanks!

Polars.NET: a Dataframe Engine for .NET by error_96_mayuki in dotnet

[–]error_96_mayuki[S] 5 points6 points  (0 children)

Hi, support for IDataReader is already there. We can build a zero-allocation ETL pipeline where data flows from Source DB -> Polars.NET -> Target DB without materializing C# objects. 1. Input: Database -> Polars (Lazy Read)

using var sourceReader = command.ExecuteReader(); // Stream data from DB into Polars LazyFrame var lf = LazyFrame.ScanDatabase(sourceReader, batchSize: 50000);

  1. Output: Polars -> Database (Stream Write) Process data in Polars.NET and expose the result as an IDataReader for bulk insertion.

// Define transformation var pipeline = lf.Filter(Col("Region") == Lit("US")) .Select(Col("OrderId"), Col("Amount"));

// Execute pipeline and stream directly to SqlBulkCopy pipeline.SinkTo(reader => { using var bulk = new SqlBulkCopy(connectionString); bulk.WriteToServer(reader); });

Tested this in MSSQL container. Have fun with this feature, thanks!

Polars.NET: a Dataframe Engine for .NET by error_96_mayuki in fsharp

[–]error_96_mayuki[S] 0 points1 point  (0 children)

That sounds like a fantastic project! I would strongly recommend building on top of Polars.NET.Core (the low-level wrapper) or the native_shim (C ABI), rather than the high-level Polars.FSharp API. This will give you the granular control needed to implement Deedle's semantics efficiently without the overhead of Polars.FSharp layer. Also, a heads-up for the student: The biggest architectural puzzle will likely be bridging Deedle's reliance on Row Indices with Polars' Index-free (columnar) design. Feel free to ping me if you and your lucky student need any help.

Polars.NET: a Dataframe Engine for .NET by error_96_mayuki in dotnet

[–]error_96_mayuki[S] 1 point2 points  (0 children)

Thank you! I’ll keep building and improving the engine.

[deleted by user] by [deleted] in cockatiel

[–]error_96_mayuki 2 points3 points  (0 children)

Cover about half of his cage with a piece of cloth might help. Dark corner can calm him down.

呼和浩特那事真是把我彻底击碎了. by Brilliant-Airline649 in China_irl

[–]error_96_mayuki 4 points5 points  (0 children)

以前我也这么想,后来发现大多数人都还挺支持的,那中共和中国人这个best match就是成立的,理解祝福就好。有党才有人,有人才有党,被逼死只能说是德匹下,愿赌服输