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

Can greptime support the same name column before statement_to_plan? #5344

Open
yihong0618 opened this issue Jan 11, 2025 · 0 comments
Open
Labels
C-enhancement Category Enhancements

Comments

@yihong0618
Copy link
Contributor

yihong0618 commented Jan 11, 2025

What type of enhancement is this?

User experience

What does the enhancement do?

for now seems greptime do not support same name column for the select stmt
very simple query will raise error

select 1,1;
--  Failed to plan SQL: Error during planning: Projections require unique expression names but the expression "Int64(1)" at position 0 and "Int64(1)" at position 1 have the same name. Consider aliasing ("AS") one of them.

and it seems from this line

.statement_to_plan(df_stmt)

datafusion side raise this error;

but for pg user(maybe others) it is a very common use case like

select oid, * from xxxx;

my question is that can we support that? I did some search like risingwave and databend seems support it. but I tried it kind of hard for me for support it myself, so I left this issue here.

and this feature also block some IDE like DBeaver support

@sunng87

Implementation challenges

No response

@yihong0618 yihong0618 added the C-enhancement Category Enhancements label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
None yet
Development

No branches or pull requests

1 participant