Comments (7)
Thanks again for reporting @suyZhong , this is fixed by #15401.
from crate.
Thank you for handling the revert @matriv. For the outer join scenario, the arg to
is null
was actuallycore.users_roles.user_id
which I think could been some kind of aScopedSymbol
(orAliasSymbol
?) such that it would be prevented fromis null
normalization. WDYT? If sounds feasible, this could be something to look into during feature freeze.
We should not optimize/normalize the is null
/is not null
of a where clause, when it acts on a column of the table on the "outer" side of the join, I don't think AliasSymbol
or so is enough to catch that.
from crate.
Also exists in 5.5.2
.
from crate.
Thanks a lot for reporting, @suyZhong!
SELECT * FROM t1 WHERE NOT ((t1.c0 != '1' )AND (t1.c0 IS NULL));
is equivalent to SELECT * FROM t1 WHERE NOT (t1.c0 IS NULL);
but the former uses get
(invalid optimization from collect
attempting to utilize the primary key in the where
clause) while latter uses collect
operator:
cr> EXPLAIN SELECT * FROM t1 WHERE NOT ((t1.c0 != '1' )AND (t1.c0 IS NULL));
+--------------------------------------------------------------------------------------+
| QUERY PLAN |
+--------------------------------------------------------------------------------------+
| Get[doc.t1 | c0 | DocKeys{'1'} | (NOT ((NOT (c0 = '1')) AND (c0 IS NULL)))] (rows=1) |
+--------------------------------------------------------------------------------------+
cr> EXPLAIN SELECT * FROM t1 WHERE NOT ((t1.c0 IS NULL));
+------------------------------------------------------------+
| QUERY PLAN |
+------------------------------------------------------------+
| Collect[doc.t1 | [c0] | (NOT (c0 IS NULL))] (rows=unknown) |
+------------------------------------------------------------+
from crate.
The fix causes issues with outer joins and it's being reverted with: #15468
from crate.
The fix causes issues with outer joins and it's being reverted with: #15468
Thank you for handling the revert @matriv. For the outer join scenario, the arg to is null
was actually core.users_roles.user_id
which I think could been some kind of a ScopedSymbol
(or AliasSymbol
?) such that it would be prevented from is null
normalization. WDYT? If sounds feasible, this could be something to look into during feature freeze.
from crate.
Fixed by #15487.
from crate.
Related Issues (20)
- Unexpected result when using `LTRIM` with `NULL` as second argument HOT 2
- Unexpected result when casting integer as boolean HOT 2
- Support dynamic nested arrays
- Add a field disk usage API
- Don't store JSON source for table rows on disk
- Weird string substitution when using JDBC HOT 6
- `NullPointerException` when joining tables on a column that exists on one table only HOT 1
- Notify pgwire clients about parameter changes using `ParameterStatus`
- Unexpected result when using `OR` HOT 1
- Unexpected result when using `INNER JOIN` and `CASE` in filter HOT 1
- Add `strpos` scalar string function. HOT 8
- Add `reverse` scalar string function. HOT 1
- Remove [-1, 1] constraint for `atan` HOT 1
- Add arithmetic `^` operator, ex: `2^3 = 8` HOT 6
- Add `numeric` overload for math functions HOT 5
- Make PostgreSQL `INTERVAL` format not case sensitive. HOT 2
- Add ability to add `INTERVAL` to DATE
- `stddev` missmatches postgres' HOT 1
- Add `sign` function HOT 2
- `exp` scalar function gives weird results HOT 1
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 crate.