-
Notifications
You must be signed in to change notification settings - Fork 3
support aliases #154
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
Merged
Merged
support aliases #154
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try avoiding the alias Record<string, string> prop everywhere. Would it be possible to populate the alias from the tableSchema or other metadata that is present in these functions. If the metadata is not introduced, can we add a prop for that?
meerkat-core/src/get-wrapped-base-query-with-projections/get-projection-clause.ts
Outdated
Show resolved
Hide resolved
meerkat-core/src/cube-measure-transformer/cube-measure-transformer.ts
Outdated
Show resolved
Hide resolved
vpbs2
reviewed
Jul 22, 2025
meerkat-core/src/cube-group-by-transformer/cube-group-by-transformer.ts
Outdated
Show resolved
Hide resolved
zaidjan-devrev
approved these changes
Jul 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for aliases when generating the query.
Previously column names would be generated as
{dataSourceName}__{columnName}
. Now, if alias field is provided in schema, that will be used instead. If alias is not provided, we fall back on the original format.Query generation with resolution is also updated to make use of aliases.
For unresolved columns, column names used to be of the form
__base_query__{dataSourceName}__{columnName}
. Now the column name will be the alias if provided else{dataSourceName}__{columnName}
For resolved columns, column names used to be of the form
{dataSourceName}__{columnName}__{resolvedColumnName
. Now it will be of the form{columnNameAlias} - {resolvedColumnNameAlias}
if the relevant aliases are provided, else{dataSourceName}__{columnName} - {resolvedColumnName}
.Included tests for all changes.
This PR also includes some formatting changes from the auto-formatter.
https://app.devrev.ai/devrev/works/ISS-191518