You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "gortiz (via GitHub)" <gi...@apache.org> on 2023/09/01 14:34:52 UTC
[GitHub] [pinot] gortiz opened a new pull request, #11484: Changes to support private columns
gortiz opened a new pull request, #11484:
URL: https://github.com/apache/pinot/pull/11484
Although https://github.com/apache/pinot/pull/11327 had fixed the issue where virtual/private columns were projected when executing `select *`, it seems that a regression in https://github.com/apache/pinot/pull/11457 that makes them appear again.
This PR tries to solve the issue by overriding some extra method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] xiangfu0 merged pull request #11484: Changes to support private columns
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 merged PR #11484:
URL: https://github.com/apache/pinot/pull/11484
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] gortiz commented on pull request #11484: Changes to support private columns
Posted by "gortiz (via GitHub)" <gi...@apache.org>.
gortiz commented on PR #11484:
URL: https://github.com/apache/pinot/pull/11484#issuecomment-1727053030
Yes, there are a couple of test that ensures that we do not project _internal_ columns
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11484: Changes to support private columns
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #11484:
URL: https://github.com/apache/pinot/pull/11484#discussion_r1313412663
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/validate/Validator.java:
##########
@@ -124,4 +129,19 @@ private static String getColumnName(SqlIdentifier identifier) {
List<String> names = identifier.names;
return names.get(names.size() - 1);
}
+
+ protected void addToSelectList(
+ List<SqlNode> list,
+ Set<String> aliases,
+ List<Map.Entry<String, RelDataType>> fieldList,
+ SqlNode exp,
+ SelectScope scope,
+ final boolean includeSystemVars) {
+ if (exp.getKind() == SqlKind.IDENTIFIER) {
+ if ((((SqlIdentifier) exp).names).stream().anyMatch(s -> s.startsWith("$"))) {
Review Comment:
Does it work if user explicitly select virtual column?
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/validate/Validator.java:
##########
@@ -124,4 +129,19 @@ private static String getColumnName(SqlIdentifier identifier) {
List<String> names = identifier.names;
return names.get(names.size() - 1);
}
+
+ protected void addToSelectList(
Review Comment:
(minor)
- Add `@Override`
- Follow Pinot Style
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] gortiz commented on a diff in pull request #11484: Changes to support private columns
Posted by "gortiz (via GitHub)" <gi...@apache.org>.
gortiz commented on code in PR #11484:
URL: https://github.com/apache/pinot/pull/11484#discussion_r1314516320
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/validate/Validator.java:
##########
@@ -124,4 +129,19 @@ private static String getColumnName(SqlIdentifier identifier) {
List<String> names = identifier.names;
return names.get(names.size() - 1);
}
+
+ protected void addToSelectList(
Review Comment:
Fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] gortiz commented on a diff in pull request #11484: Changes to support private columns
Posted by "gortiz (via GitHub)" <gi...@apache.org>.
gortiz commented on code in PR #11484:
URL: https://github.com/apache/pinot/pull/11484#discussion_r1313119263
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/validate/Validator.java:
##########
@@ -124,4 +129,19 @@ private static String getColumnName(SqlIdentifier identifier) {
List<String> names = identifier.names;
return names.get(names.size() - 1);
}
+
+ protected void addToSelectList(
+ List<SqlNode> list,
+ Set<String> aliases,
+ List<Map.Entry<String, RelDataType>> fieldList,
+ SqlNode exp,
+ SelectScope scope,
+ final boolean includeSystemVars) {
+ if (exp.getKind() == SqlKind.IDENTIFIER) {
+ if ((((SqlIdentifier) exp).names).stream().anyMatch(s -> s.startsWith("$"))) {
Review Comment:
I'm not sure if this would match all the cases we want to ignore @Jackie-Jiang @xiangfu0.
This method is called once for each field in the calcite table row.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] xiangfu0 commented on a diff in pull request #11484: Changes to support private columns
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on code in PR #11484:
URL: https://github.com/apache/pinot/pull/11484#discussion_r1313654752
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/validate/Validator.java:
##########
@@ -124,4 +129,19 @@ private static String getColumnName(SqlIdentifier identifier) {
List<String> names = identifier.names;
return names.get(names.size() - 1);
}
+
+ protected void addToSelectList(
+ List<SqlNode> list,
+ Set<String> aliases,
+ List<Map.Entry<String, RelDataType>> fieldList,
+ SqlNode exp,
+ SelectScope scope,
+ final boolean includeSystemVars) {
+ if (exp.getKind() == SqlKind.IDENTIFIER) {
+ if ((((SqlIdentifier) exp).names).stream().anyMatch(s -> s.startsWith("$"))) {
Review Comment:
I think so, let's add a test for this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] walterddr commented on pull request #11484: Changes to support private columns
Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on PR #11484:
URL: https://github.com/apache/pinot/pull/11484#issuecomment-1724149302
just to confirm the behavior for private column is now matching v1 right? (e.g. we dont need any additional documentation to state the differences)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] gortiz commented on pull request #11484: Changes to support private columns
Posted by "gortiz (via GitHub)" <gi...@apache.org>.
gortiz commented on PR #11484:
URL: https://github.com/apache/pinot/pull/11484#issuecomment-1704726474
> Does it work if user explicitly select virtual column?
Yes. This method is only called when adding columns in `select *`. The main issue is that is not explicitly said in Calcite's javadoc. I've added a comment including the discussion in Calcite dev email list when Julian Hyde says this is not a supported feature and invite us to add a proposal (something we should do, but I guess we want to solve the issue first).
I've added a couple of test to verify the behavior and detect a possible regression in future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] codecov-commenter commented on pull request #11484: Changes to support private columns
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11484:
URL: https://github.com/apache/pinot/pull/11484#issuecomment-1702935532
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/11484?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#11484](https://app.codecov.io/gh/apache/pinot/pull/11484?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (fdd6120) into [master](https://app.codecov.io/gh/apache/pinot/commit/43e785dfb31d388bbb3bc3dda36ee4016aa8868f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (43e785d) will **decrease** coverage by `0.15%`.
> Report is 1 commits behind head on master.
> The diff coverage is `40.00%`.
```diff
@@ Coverage Diff @@
## master #11484 +/- ##
============================================
- Coverage 62.93% 62.79% -0.15%
+ Complexity 1098 1096 -2
============================================
Files 2319 2319
Lines 124402 124407 +5
Branches 18996 18996
============================================
- Hits 78294 78119 -175
- Misses 40544 40713 +169
- Partials 5564 5575 +11
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [integration](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (ø)` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (ø)` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <0.00%> (ø)` | |
| [java-11](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.43% <0.00%> (-48.46%)` | :arrow_down: |
| [java-17](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.77% <40.00%> (-0.03%)` | :arrow_down: |
| [java-20](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.77% <40.00%> (+48.34%)` | :arrow_up: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.79% <40.00%> (-0.15%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.78% <40.00%> (-0.15%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.23% <40.00%> (-0.21%)` | :arrow_down: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/11484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `14.43% <0.00%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files Changed](https://app.codecov.io/gh/apache/pinot/pull/11484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...ava/org/apache/pinot/query/validate/Validator.java](https://app.codecov.io/gh/apache/pinot/pull/11484?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtcXVlcnktcGxhbm5lci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvcXVlcnkvdmFsaWRhdGUvVmFsaWRhdG9yLmphdmE=) | `74.28% <40.00%> (-5.72%)` | :arrow_down: |
... and [22 files with indirect coverage changes](https://app.codecov.io/gh/apache/pinot/pull/11484/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org