-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Adding column name rewrite for the identifiers in the format of [table].[column] #5734
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
Adding column name rewrite for the identifiers in the format of [table].[column] #5734
Conversation
Jackie-Jiang
left a comment
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.
LGTM otherwise
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
Outdated
Show resolved
Hide resolved
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
Outdated
Show resolved
Hide resolved
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
Outdated
Show resolved
Hide resolved
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
Outdated
Show resolved
Hide resolved
...on-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
Outdated
Show resolved
Hide resolved
...on-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java
Outdated
Show resolved
Hide resolved
2c1102e to
7310a1c
Compare
…e_name].[column_name]
7310a1c to
1acea4b
Compare
| if (tableNameSplits.length != 2) { | ||
| return; | ||
| } | ||
| String[] tableNameSplits = StringUtils.split(tableName, ".", 2); |
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.
Does the calcite parser not support getting columns names from [table].[column] format? If so, we should just use that, instead of post processing here? We have been adding small string manipulations per query incrementally, and I fear it will add up to have performance significance soon.
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.
Calcite doesn't support parse it as [table].[column], we will get the whole as identifier.
Then we need to handle that.
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.
If Calcite doesn't support, then should we support it? The logic seems brittle anyways.
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.
We should. The usage is for other system integrations like tableau
|
@mayankshriv Any more comments here? The extra overhead for existing queries is the string split on dot for table and column names. |
Description
Adding column name rewrite for the format of [table].[column].
This is required as many external integrations like Tableau uses [table].[column] as identifier, and send them through JDBC client.
E.g.
SELECT myTable.colA FROM myTable LIMIT 10will be rewrite toSELECT colA FROM myTable LIMIT 10.Release Notes
Adding column name rewrite for the format of [table].[column]