Python interpreter in SQL - the reverse of what was done - would've been really impressive. Terrible idea of course but impressive nonetheless.
A Python to SQL compiler already exists https://db.cs.uni-tuebingen.de/publications/2022/snakes-on-a...
I wrote a SQL engine in Python
11–20 of 81 posts
Re: I wrote a SQL engine in Python
#12That's like saying "a library to parse and optimize computer programs", except probably even harder, since a compiler and runtime library can't make any assumptions about the programs they need to make run, so they're limited in the potential of utilizing all that context information.
Countless person-years have been spent on this and it's still a very active fields of research and engineering.
> 2x SparkSQL performance
Ah, ok, so it can be slow. Never mind then, carry on :-P
Re: I wrote a SQL engine in Python
#13> A library to parse and optimize SQL, That's like saying "a library to parse and optimize computer programs", except probably even harder, since a compiler and runtime library can't make any assumptions about the programs they need to make run, so they're limited in the potential of utilizing all that context information. Countless person-years have been spent on this and it's still a very active fields of research…
Re: I wrote a SQL engine in Python
#14Re: I wrote a SQL engine in Python
#15Re: I wrote a SQL engine in Python
#16Funnily enough I'm currently writing a NoSQL database in Python.
Re: I wrote a SQL engine in Python
#17> A library to parse and optimize SQL, That's like saying "a library to parse and optimize computer programs", except probably even harder, since a compiler and runtime library can't make any assumptions about the programs they need to make run, so they're limited in the potential of utilizing all that context information. Countless person-years have been spent on this and it's still a very active fields of research…
SELECT * FROM (SELECT * FROM x) WHERE z = 1
can be optimized into
SELECT * FROM x where z = 1
Re: I wrote a SQL engine in Python
#18Have you tested this with Jepsen?
Re: I wrote a SQL engine in Python
#19Funnily enough I'm currently writing a NoSQL database in Python.