HNHacker News
TopNewBestAskShowJobs

marsupialtail_2

264 karma · joined October 29, 2022

submissionscomments
marsupialtail_2··on I wrote a SQL engine in Python
None of the benchmarks involved any UDFs.
marsupialtail_2··on I wrote a SQL engine in Python
Polars is adding that feature itself. You probably just have to wait a couple weeks
marsupialtail_2··on I wrote a SQL engine in Python
I have. I am about 2x faster than trino with fault tolerance. But I didn't put the numbers on that plot because this trino feature is still really new and I might not be benchmarking it in the best way.
marsupialtail_2··on I wrote a SQL engine in Python
I only wrote Python. I am using C++ and Rust libraries
marsupialtail_2··on I wrote a SQL engine in Python
Yeah it's just that the UDFs I see people need require Python packages like sklearn and PyTorch that really don't have good alternatives in other libraries.
marsupialtail_2··on I wrote a SQL engine in Python
that's certainly one way to look at it
marsupialtail_2··on I wrote a SQL engine in Python
Yes -- we are building a sql compiler to the dataframe API. It currently passes half of TPC-H, but is not really ready. It will be open-sourced soon.

The SQL optimizations like predicate pushdown and early projection are all there already in the dataframe API, similar to Polars.

marsupialtail_2··on I wrote a SQL engine in Python
Name?
marsupialtail_2··on I wrote a SQL engine in Python
The focus is olap and etl not oltp. In fact I assume data doesn't change :-)
marsupialtail_2··on I wrote a SQL engine in Python
SQLGlot is really great, check it out!
marsupialtail_2··on I wrote a SQL engine in Python
I don't really compile python functions to sql -- I just execute sql. It's just that the execution engine is written in python
marsupialtail_2··on I wrote a SQL engine in Python
hmm I wasn't aware of https://github.com/apache/arrow-datafusion-python... thanks for the pointer.

time series target release by April this year. main challenge is supporting them in the SQL API -- execution engine support is already done

marsupialtail_2··on I wrote a SQL engine in Python
Firstly quokka is pure Python, which I believe is good for interoperability with Python based UDFs.

Secondly quokka tries to be fault tolerant. I.e. it can handle worker failures intra query and not have to start over. This is quite important in real world spark deployments with thousands of nodes running many hours. AFAIK this is not well supported by most spark alternatives.

Finally quokka has a much stronger focus on time series data analytics. It is meant to excel at workloads like range joins and asof/PIT joins used for feature engineering. (This part isn't too stable yet so is not open source)

This means quokka optimizes on a different point in the UDF/performance/fault tolerance tradeoff space than something like arrow ballista or starrocks, which I think are pure performance plays

marsupialtail_2··on I wrote a SQL engine in Python
Checkpointing is actually a bit difficult for fault tolerance for long running batch computations and state tends to grow linearly as the computation progresses, unlike streaming applications where you typically use windows. This means periodic checkpointing leads to quadratic amount of writes to durable storage which is pretty bad.

Quokka supports checkpointing but does not enable that by default to prevent this common problem from killing normal operation performance.

marsupialtail_2··on I wrote a SQL engine in Python
Perhaps you can write the underlying query engine :-) in something that's not Python lol
marsupialtail_2··on Why I'm still using Python
I just find it funny how my post on why I wrote a SQL engine in pure Python is right next to this one on the front page
marsupialtail_2··on Show HN: Rewriting SparkSQL in Python
Ask me anything :-)
← PreviousPage 2 of 2