You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Shield0814 (via GitHub)" <gi...@apache.org> on 2024/04/09 06:49:47 UTC
[I] [Bug] 相同sql,多次查询结果不一致,来回跳 [doris]
Shield0814 opened a new issue, #33418:
URL: https://github.com/apache/doris/issues/33418
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Version
2.0.7
### What's Wrong?
如下sql多次查询结果,来回跳
select * from policy_db.cp_credit_variable_raw where dt=20240407 and field_name in ('productId','tradeCode','tradeMode') and instruction = 3677533288051769738;
表为unique 模型,所有字段都是key
### What You Expected?
如何每次保证查询结果一致
### How to Reproduce?
_No response_
### Anything Else?
_No response_
### Are you willing to submit PR?
- [ ] 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
Re: [I] [Bug] 相同sql,多次查询结果不一致,来回跳 [doris]
Posted by "Shield0814 (via GitHub)" <gi...@apache.org>.
Shield0814 commented on issue #33418:
URL: https://github.com/apache/doris/issues/33418#issuecomment-2046282546
> ```sql
> select * from policy_db.cp_credit_variable_raw where dt=20240407 and trim(field_name) in ('productId','tradeCode','tradeMode') and instruction = 3677533288051769738;
> 你试试这样看看:
>
> ```sql
> select * from policy_db.cp_credit_variable_raw where dt=20240407 and trim(field_name) in ('productId','tradeCode','tradeMode') and instruction = 3677533288051769738;
> ```
还是会来回跳, filed_name的类型是varchar(1000)
--
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
Re: [I] [Bug] 相同sql,多次查询结果不一致,来回跳 [doris]
Posted by "jianghuzai (via GitHub)" <gi...@apache.org>.
jianghuzai commented on issue #33418:
URL: https://github.com/apache/doris/issues/33418#issuecomment-2045010336
你试试这样看看:
```sql
select * from policy_db.cp_credit_variable_raw where dt=20240407 and trim(field_name) in ('productId','tradeCode','tradeMode') and instruction = 3677533288051769738;
```
--
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
Re: [I] [Bug] 相同sql,多次查询结果不一致,来回跳 [doris]
Posted by "Shield0814 (via GitHub)" <gi...@apache.org>.
Shield0814 commented on issue #33418:
URL: https://github.com/apache/doris/issues/33418#issuecomment-2048795835
> https://doris.apache.org/zh-CN/docs/faq/sql-faq#q4-unique-key-%E6%A8%A1%E5%9E%8B%E6%9F%A5%E8%AF%A2%E7%BB%93%E6%9E%9C%E4%B8%8D%E4%B8%80%E8%87%B4
感谢恢复,但是我看这个uniq模型中的所有字段都是key,为什么会出现这种情况呢,这文档说的是key相同但是,不同value(非key)字段的顺序不同导致结果不一样,所有字段都是key,为啥会出现这种情况呢,field_name就是key字段
--
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
Re: [I] [Bug] 相同sql,多次查询结果不一致,来回跳 [doris]
Posted by "guanxine (via GitHub)" <gi...@apache.org>.
guanxine commented on issue #33418:
URL: https://github.com/apache/doris/issues/33418#issuecomment-2050853628
我也出现了同样得问题,所有字段都是key, 查询结果固定几种。是什么原因没办法识别uk么?
--
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
Re: [I] [Bug] 相同sql,多次查询结果不一致,来回跳 [doris]
Posted by "Shield0814 (via GitHub)" <gi...@apache.org>.
Shield0814 commented on issue #33418:
URL: https://github.com/apache/doris/issues/33418#issuecomment-2044269946
两种结果分别为:
+----------+------------+---------------------+
| dt | field_name | instruction |
+----------+------------+---------------------+
| 20240407 | productId | 3677533288051769738 |
| 20240407 | tradeCode | 3677533288051769738 |
| 20240407 | tradeMode | 3677533288051769738 |
+----------+------------+---------------------+
+----------+------------+---------------------+
| dt | field_name | instruction |
+----------+------------+---------------------+
| 20240407 | productId | 3677533288051769738 |
| 20240407 | tradeCode | 3677533288051769738 |
+----------+------------+---------------------+
--
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
Re: [I] [Bug] 相同sql,多次查询结果不一致,来回跳 [doris]
Posted by "gugoen (via GitHub)" <gi...@apache.org>.
gugoen commented on issue #33418:
URL: https://github.com/apache/doris/issues/33418#issuecomment-2046627972
https://doris.apache.org/zh-CN/docs/faq/sql-faq#q4-unique-key-%E6%A8%A1%E5%9E%8B%E6%9F%A5%E8%AF%A2%E7%BB%93%E6%9E%9C%E4%B8%8D%E4%B8%80%E8%87%B4
--
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