Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong result for ArithmeticExpr #975

Closed
kangkaisen opened this issue Apr 19, 2019 · 7 comments
Closed

Wrong result for ArithmeticExpr #975

kangkaisen opened this issue Apr 19, 2019 · 7 comments

Comments

@kangkaisen
Copy link
Contributor

Describe the bug

mysql> select 3074062.5421333313 * (9562325.0921268463 / 3946 - 97281.800003051758 / 384);
+-----------------------------------------------------------------------------+
| 3074062.5421333313 * (9562325.0921268463 / 3946 - 97281.800003051758 / 384) |
+-----------------------------------------------------------------------------+
|                                     6670585822.007877058-.+/.+(*6640070909 |
+-----------------------------------------------------------------------------+
1 row in set (0.05 sec)

@imay
Copy link
Contributor

imay commented Apr 19, 2019

It looks like that result string has dirty content

@chenhao7253886
Copy link
Contributor

This bug has been fixed in master, it should be Decimal's bug and new Decimal has fixed it.

@kangkaisen
Copy link
Contributor Author

@chenhao7253886 Hi, which PR fix this issue?

@imay
Copy link
Contributor

imay commented Apr 20, 2019

@chenhao7253886 Hi, which PR fix this issue?

#727
this patch change our decimal implementation to another. This precision is lower than current one. And has no problem for this case.

And this bug is in the current implementation, we are trying to fix it.

@kangkaisen
Copy link
Contributor Author

@imay OK. Thanks you.

@imay
Copy link
Contributor

imay commented Apr 21, 2019

@kangkaisen

You can try #980 to see if this will fix your problem

@kangkaisen
Copy link
Contributor Author

#980 has fixed this issue, Thanks!

liaoxin01 pushed a commit to liaoxin01/doris that referenced this issue Nov 18, 2022
…ition hit index condition, we do read data in second phase fetch (apache#975)

rules as follow:
```
1. only ordering column need to be read when in condition bellow:
eg. `select * from test_es_nested_json where  title  match 'java'  order by  creationDate, qid  limit 10;`
column data except `creationDate` and `qid` should not be read from segment iterator, as for `title` since it has inverted index, we just need to using it's index data to filter rowids and set into row id column, the real data will be fetch and update in second phase

2. we still need `title` in reading schema, since we still put this column in `vectorized::Block`, but fill default values in SegmentIterator::_prune_column

```

Co-authored-by: eldenmoon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants