-
Notifications
You must be signed in to change notification settings - Fork 64
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
Support TSQL PIVOT operator #165
Support TSQL PIVOT operator #165
Conversation
bool isPivot; | ||
struct SelectStmt *srcSql; | ||
struct SelectStmt *catSql; | ||
List *value_col_strlist; | ||
char *pivotCol; | ||
Node *aggFunc; |
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.
Since you are adding in new fields to SelectStmt
please refer to the following fix by @timchang514 where he fixed a problem with uninitialized value when copying these types of structs. Please check if you need to do the same.
commit 26b4e995d4b69e934c511019ee2175a31227c56a
Author: Tim Chang <[email protected]>
Date: Mon Sep 25 15:14:17 2023 -0400
Add new fields to IntoClause funcs to avoid issues with uninitialized memory. (#219)
Signed-off-by: Tim Chang <[email protected]>
Also, I found your branch based on a really old commit. You may need to rebase.
Add a boolean isPivot in SelectStmt to check if it is a pivot select Task: BABEL-284 Signed-off-by: Yanjie Xu <[email protected]>
Added transformPivotClause function in analyer to help identify output table columns' data type. Task: BABEL-284 Signed-off-by: Yanjie Xu <[email protected]>
Refactor code from engine to extension Task: BABEL-284 Signed-off-by: Yanjie Xu <[email protected]>
ed8d6d1
into
babelfish-for-postgresql:BABEL_3_X_DEV__PG_15_X
Add support for PIVOT in babelfish Task: BABEL-284 Signed-off-by: Yanjie Xu <[email protected]>
Add support for PIVOT in babelfish Task: BABEL-284 Signed-off-by: Yanjie Xu <[email protected]>
Description
This PR brings PIVOT operator to Babelfish.
Issues Resolved
Task: BABEL-284
Check List
By submitting this pull request, I confirm that my contribution is under the terms of the PostgreSQL license, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.