-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: query compiler proof of concept #5024
Conversation
WASM Query Engine file Size
|
CodSpeed Performance ReportMerging #5024 will not alter performanceComparing Summary
|
2d4977c
to
3668ee0
Compare
9f44246
to
b1c7caf
Compare
|
||
if [[ "$OSTYPE" == "linux-gnu"* ]] && command -v lld &> /dev/null && [ ! -f .cargo/config.toml ]; then | ||
mkdir -p .cargo | ||
cat << EOF > .cargo/config.toml | ||
[target.$(uname -m)-unknown-linux-gnu] | ||
rustflags = ["-C", "link-arg=-fuse-ld=lld"] | ||
EOF | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated changes, can be dropped or extracted to a different PR
@@ -25,6 +28,12 @@ impl<'a> IntoSql<'a> for &'a Value<'a> { | |||
ValueType::DateTime(val) => val.into_sql(), | |||
ValueType::Date(val) => val.into_sql(), | |||
ValueType::Time(val) => val.into_sql(), | |||
ValueType::Var(name, _) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it might be worth introducing a separate type at this point, to guarantee we don't try to put one of these in an actual database query,
We could maybe have ValueType
with a type parameter that turns Var
into Never
when we output a database query, or just a separate enum
Related Engine PR: prisma/prisma-engines#5024
Separate query planning and execution and lower the query graph into a format executable by the client.
Translates, for example,
to
which is then executed by the
QueryInterpeter
on the client.Processing query graphs with more than one node is work in progress. Functions in the edges (data dependencies) can be executed at compile time thanks to the new
Placeholder
abstraction (we can algebraically substitute future values not yet fetched from the database into the inputs of downstream graph nodes and continue building the query with them before those values actually exist). Flow and computation nodes need to be redesigned though.Client: prisma/prisma#25511