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

feat(eap): add support for virtual columns in the protobuf #21

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

volokluev
Copy link
Member

There is a requirement to have the ability to search by virtual columns. Remove the AttributeKeyTransformContext which special cased proejct id and make it generic for any desired virtual column

@colin-sentry
Copy link
Member

how would this work for the uint case, everything gets converted to strings?

@volokluev
Copy link
Member Author

how would this work for the uint case, everything gets converted to strings?

That's what I was thinking. I mostly did this because I can't do a oneOf map in protobuf. But if you have another solution that allows specifying both I'm happy to hear it

Comment on lines +26 to +27
string from_column_name = 1;
string to_column_name = 2;
Copy link
Member

Choose a reason for hiding this comment

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

Few questions here

  • Does this mean to_column_name will be the name of the virtual column?
  • Is this name constrained anywhere or is it an arbitrary string?
  • Will this guarantee the to_column_name will be the name of a column in the response?
  • Will this name be accessible in other parts of the query? So think count_unique(project) will get the project names substituted in automatically? (not saying we'll do this, just want to understand the semantics of this context).

Copy link
Member Author

@volokluev volokluev Sep 9, 2024

Choose a reason for hiding this comment

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

Does this mean to_column_name will be the name of the virtual column?

Yes

Is this name constrained anywhere or is it an arbitrary string?

Whatever you want bb

Will this guarantee the to_column_name will be the name of a column in the response?

Yes

Will this name be accessible in other parts of the query? So think count_unique(project) will get the project names substituted in automatically? (not saying we'll do this, just want to understand the semantics of this context).

This is a good question. I would say for now these virtual columns can be used to order by, filter, and in the result set. aggregations on virtual columns not supported

@volokluev volokluev merged commit 55171a4 into main Sep 10, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

3 participants