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

[bugfix] fix issue 2857:Wrong query result when use alias #2891

Merged
merged 1 commit into from Nov 19, 2021

Conversation

miamia0
Copy link
Contributor

@miamia0 miamia0 commented Nov 19, 2021

I hereby agree to the terms of the CLA available at: https://databend.rs/policies/cla/

Summary

result:

mysql> SELECT number + 1 AS number, number AS number1 FROM numbers(10);
+--------+---------+
| number | number1 |
+--------+---------+
|      6 |       5 |
|      2 |       1 |
|      8 |       7 |
|      9 |       8 |
|     10 |       9 |
|      1 |       0 |
|      4 |       3 |
|      3 |       2 |
|      7 |       6 |
|      5 |       4 |
+--------+---------+
10 rows in set (0.01 sec)
Read 10 rows, 80 B in 0.002 sec., 5.22 thousand rows/sec., 41.78 KB/sec.

Changelog

  • Bug Fix

Related Issues

Fixes #2857

Test Plan

Unit Tests

Stateless Tests

@databend-bot
Copy link
Member

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@databend-bot databend-bot added pr-bugfix this PR patches a bug in codebase need-review labels Nov 19, 2021
@miamia0 miamia0 changed the title [bugfix] fix issue 2857 [bugfix] fix issue 2857:Wrong query result when use alias Nov 19, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 19, 2021

Codecov Report

Merging #2891 (c616815) into main (8847cd8) will increase coverage by 0%.
The diff coverage is 84%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2891   +/-   ##
=====================================
  Coverage     67%     67%           
=====================================
  Files        586     588    +2     
  Lines      31443   31504   +61     
=====================================
+ Hits       21280   21323   +43     
- Misses     10163   10181   +18     
Impacted Files Coverage Δ
...elines/transforms/transform_expression_executor.rs 81% <70%> (+<1%) ⬆️
.../pipelines/transforms/transform_expression_test.rs 93% <93%> (-1%) ⬇️
query/src/common/mod.rs 68% <0%> (-3%) ⬇️
query/src/interpreters/interpreter_insert_into.rs 50% <0%> (-2%) ⬇️
query/src/api/http/v1/logs.rs 81% <0%> (-2%) ⬇️
.../datasources/database/system/columns_table_test.rs 91% <0%> (-2%) ⬇️
.../datasources/database/system/credits_table_test.rs 91% <0%> (-2%) ⬇️
...datasources/database/system/clusters_table_test.rs 91% <0%> (-2%) ⬇️
...atasources/database/system/functions_table_test.rs 91% <0%> (-2%) ⬇️
...sources/database/system/contributors_table_test.rs 91% <0%> (-2%) ⬇️
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8847cd8...c616815. Read the comment docs.

Copy link
Member

@zhang2014 zhang2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job. Thank you.

@databend-bot
Copy link
Member

Wait for another reviewer approval

@zhang2014 zhang2014 merged commit 388c9f7 into datafuselabs:main Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-review pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong query result when use alias
4 participants