You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/26 11:06:36 UTC
[GitHub] [doris] morrySnow opened a new issue, #13698: [Bug] infer predicate could generate predicates in another scope
morrySnow opened a new issue, #13698:
URL: https://github.com/apache/doris/issues/13698
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
### Version
master
1.1
### What's Wrong?
infer predicate generate wrong filter on inline view
### What You Expected?
quert success
### How to Reproduce?
```sql
CREATE TABLE t2 (
a varchar(1) NULL COMMENT "",
x varchar(1) NULL COMMENT "",
c varchar(1) NULL COMMENT ""
) ENGINE=OLAP
UNIQUE KEY(a)
DISTRIBUTED BY HASH(a) BUCKETS 8
PROPERTIES (
"replication_allocation" = "tag.location.default:1",
"in_memory" = "false",
"storage_format" = "V2"
);
CREATE TABLE t5 (
x varchar(5) NULL COMMENT "",
d varchar(3) NULL COMMENT ""
) ENGINE=OLAP
UNIQUE KEY(x)
DISTRIBUTED BY HASH(x) BUCKETS 8
PROPERTIES (
"replication_allocation" = "tag.location.default:1",
"in_memory" = "false",
"storage_format" = "V2"
);
CREATE TABLE t4 (
a varchar(1) NULL COMMENT "",
e varchar(1) NULL COMMENT ""
) ENGINE=OLAP
UNIQUE KEY(a)
DISTRIBUTED BY HASH(a) BUCKETS 8
PROPERTIES (
"replication_allocation" = "tag.location.default:1",
"in_memory" = "false",
"storage_format" = "V2"
);
CREATE TABLE t1 (
k1 varchar(20) NULL COMMENT "",
dt date NULL COMMENT ""
) ENGINE=OLAP
UNIQUE KEY(k1)
DISTRIBUTED BY HASH(k1) BUCKETS 6
PROPERTIES (
"replication_allocation" = "tag.location.default:1",
"in_memory" = "false",
"storage_format" = "V2"
);
CREATE VIEW v1
AS
SELECT k1
FROM t1
WHERE dt = (
SELECT max(dt)
FROM t1
);
select
f1.k1
from (
select
t2.c as k1
from t5
inner join t2 on t2.x=t5.x
inner join t4 on t2.a=t4.a and t2.x in ('ZCR', 'ZDR')
) f1
left join v1 on f1.k1=v1.k1;
```
### Anything Else?
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei closed issue #13698: [Bug] infer predicate could generate predicates in another scope
Posted by GitBox <gi...@apache.org>.
yiguolei closed issue #13698: [Bug] infer predicate could generate predicates in another scope
URL: https://github.com/apache/doris/issues/13698
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org