Unverified 提交 c9c2f97b authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov 提交者: GitHub

Merge pull request #1773 from katzyn/npe

Fix NPE in TableFilter.createIndexConditions()
...@@ -21,6 +21,10 @@ Change Log ...@@ -21,6 +21,10 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
<li>Issue #1771: NPE in Comparison.createIndexConditions
</li>
<li>PR #1772: Fix newlines in test scripts
</li>
<li>Issue #1762: NullPointerException in Parser. Introduced in 1.4.198 <li>Issue #1762: NullPointerException in Parser. Introduced in 1.4.198
</li> </li>
<li>PR #1768: Add more context-sensitive keywords <li>PR #1768: Add more context-sensitive keywords
......
...@@ -721,6 +721,7 @@ public class TableFilter implements ColumnResolver { ...@@ -721,6 +721,7 @@ public class TableFilter implements ColumnResolver {
public void createIndexConditions() { public void createIndexConditions() {
if (joinCondition != null) { if (joinCondition != null) {
joinCondition = joinCondition.optimize(session);
joinCondition.createIndexConditions(session, this); joinCondition.createIndexConditions(session, this);
if (nestedJoin != null) { if (nestedJoin != null) {
joinCondition.createIndexConditions(session, nestedJoin); joinCondition.createIndexConditions(session, nestedJoin);
......
...@@ -815,3 +815,14 @@ SELECT A.X FROM A JOIN B ON A.X = B.Y AND B.Y >= COALESCE((SELECT Z FROM C FETCH ...@@ -815,3 +815,14 @@ SELECT A.X FROM A JOIN B ON A.X = B.Y AND B.Y >= COALESCE((SELECT Z FROM C FETCH
DROP TABLE A, B, C; DROP TABLE A, B, C;
> ok > ok
CREATE TABLE TEST(A INT PRIMARY KEY);
> ok
SELECT * FROM TEST X LEFT OUTER JOIN TEST Y ON Y.A = X.A || '1';
> A A
> - -
> rows: 0
DROP TABLE TEST;
> ok
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论