Comments (6)
Could you provide a definition of Status or tweak it to not use a scalar that's missing? Thanks!
from edgedb.
@msullivan done
from edgedb.
Thanks! It looks like this is some sort of insane path factoring related bug. Ahhhhhh: because .status
is path factored out, it is "visible" from its use in the nested select, which combined with the union as part of the if condition, is causing trouble.
I'm digging into it more, but if you put the reference to .status
in the if condition inside a subquery ((select .status)
or {.status}
) it prevents the issue.
A reduced version is
select C {
bs := (
with complete := .status
select {
complete := complete,
}
) if .status != 'Private' else {}
};
from edgedb.
Smart. Forgot to mention, I got around it by throwing the if
check as a part of the filter on the select. Seems to be mildly faster too.
from edgedb.
Smart. Forgot to mention, I got around it by throwing the
if
check as a part of the filter on the select. Seems to be mildly faster too.
Yeah, that is a generally cleaner approach and will typically be faster. FILTER
(WHERE
in SQL) is a pretty fundamental concept in SQL, and IF
is not.
from edgedb.
Another note: the ability to have an object with a shape in the then
clause of an if
and and empty set in the else
clause and have it preserve the output shape was introduced completely by accident in 4.0. I didn't realize it worked until the issue. Normally an if
always loses the output shape.
Arguably it's a bug that it doesn't here.
from edgedb.
Related Issues (20)
- Configuration via connection options over SQL adapter
- Index not used for sort HOT 1
- could not serialize access due to read/write dependencies among transactions HOT 2
- Typo/awkward wording in migration documentation guide HOT 1
- Extension upgrades
- Query performance observability
- Implement `net` and `net::http` module per RFC 1026
- Flaky test `test_edgeql_ddl_migration_sdl_01`
- Support making SQL queries over edgedb protocol HOT 1
- Extension packaging HOT 2
- Move standard libraries into std module
- Configurable query parameters for OAuth providers
- Mutation rewrites are not triggered when updating a subtype object from it's parent type
- Type checks in if/else should affect the types in the results HOT 1
- Add documentation/scheme to HTTP API for EdgeDB Auth
- Remove path factoring
- Extension package hosting and download
- Can't use computeds in AI indexing
- Deferrable triggers
- Discord invite links expired
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edgedb.