You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "xiangfu0 (via GitHub)" <gi...@apache.org> on 2025/11/11 05:00:00 UTC

[PR] Adding v1 operator ARRAY_JOIN [pinot]

xiangfu0 opened a new pull request, #17182:
URL: https://github.com/apache/pinot/pull/17182

   (no comment)


-- 
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


Re: [PR] Adding v1 operator ARRAY_JOIN [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #17182:
URL: https://github.com/apache/pinot/pull/17182#issuecomment-3516238673

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/17182?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `65.71429%` with `48 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 56.07%. Comparing base ([`ba01450`](https://app.codecov.io/gh/apache/pinot/commit/ba014509414823d42651ac297a1de3a0e77bbb8d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`874617a`](https://app.codecov.io/gh/apache/pinot/commit/874617af84a1b23f0c655a6a30fe6942b1be0528?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/17182?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...not/core/operator/transform/ArrayJoinOperator.java](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Foperator%2Ftransform%2FArrayJoinOperator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9vcGVyYXRvci90cmFuc2Zvcm0vQXJyYXlKb2luT3BlcmF0b3IuamF2YQ==) | 0.00% | [17 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...org/apache/pinot/sql/parsers/CalciteSqlParser.java](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&filepath=pinot-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fsql%2Fparsers%2FCalciteSqlParser.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcWwvcGFyc2Vycy9DYWxjaXRlU3FsUGFyc2VyLmphdmE=) | 76.92% | [5 Missing and 7 partials :warning: ](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...va/org/apache/pinot/core/plan/ProjectPlanNode.java](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Fplan%2FProjectPlanNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9wbGFuL1Byb2plY3RQbGFuTm9kZS5qYXZh) | 45.00% | [8 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../sql/parsers/parser/SqlArrayJoinTableFunction.java](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&filepath=pinot-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fsql%2Fparsers%2Fparser%2FSqlArrayJoinTableFunction.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcWwvcGFyc2Vycy9wYXJzZXIvU3FsQXJyYXlKb2luVGFibGVGdW5jdGlvbi5qYXZh) | 46.15% | [7 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...t/core/query/request/context/ArrayJoinContext.java](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Fquery%2Frequest%2Fcontext%2FArrayJoinContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9xdWVyeS9yZXF1ZXN0L2NvbnRleHQvQXJyYXlKb2luQ29udGV4dC5qYXZh) | 91.66% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/17182?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (ba01450) and HEAD (874617a). Click for more details.
   > 
   > <details><summary>HEAD has 36 uploads less than BASE</summary>
   >
   >| Flag | BASE (ba01450) | HEAD (874617a) |
   >|------|------|------|
   >|java-21|5|1|
   >|unittests1|2|1|
   >|unittests|4|1|
   >|temurin|10|1|
   >|java-11|5|0|
   >|unittests2|2|0|
   >|integration|6|0|
   >|integration1|2|0|
   >|integration2|2|0|
   >|custom-integration1|2|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #17182      +/-   ##
   ============================================
   - Coverage     63.22%   56.07%   -7.15%     
   + Complexity     1428      701     -727     
   ============================================
     Files          3117     2433     -684     
     Lines        184413   136307   -48106     
     Branches      28283    21800    -6483     
   ============================================
   - Hits         116588    76434   -40154     
   + Misses        58839    53463    -5376     
   + Partials       8986     6410    -2576     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-11](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-21](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.07% <65.71%> (-7.10%)` | :arrow_down: |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.07% <65.71%> (-7.15%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.07% <65.71%> (-7.15%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.07% <65.71%> (-0.06%)` | :arrow_down: |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/17182/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   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.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/17182?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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


Re: [PR] Adding v1 operator ARRAY_JOIN [pinot]

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on PR #17182:
URL: https://github.com/apache/pinot/pull/17182#issuecomment-5080358560

   Closing this. `CROSS JOIN UNNEST` landed in the multi-stage engine in #17168 (with column pruning added in #18782) and covers this functionality, plus `WITH ORDINALITY` which this PR doesn't support. Adding a parallel implementation to the single-stage engine isn't the right investment given the direction toward MSE-by-default.
   
   Two gaps remain worth tracking separately:
   
   - ClickHouse-compatible `ARRAY JOIN` / `LEFT ARRAY JOIN` syntax, implemented as a parser-level desugaring to `CROSS JOIN UNNEST` so it runs on MSE.
   - Outer unnest semantics (keep rows whose array is empty) — `RelToPlanNodeConverter#convertLogicalCorrelate` currently ignores the correlate's join type.


-- 
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


Re: [PR] Adding v1 operator ARRAY_JOIN [pinot]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #17182:
URL: https://github.com/apache/pinot/pull/17182#discussion_r2752349529


##########
pinot-core/src/main/java/org/apache/pinot/core/query/request/context/ArrayJoinContext.java:
##########
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.core.query.request.context;
+
+import java.util.List;
+import javax.annotation.Nullable;
+import org.apache.pinot.common.request.ArrayJoinType;
+import org.apache.pinot.common.request.context.ExpressionContext;
+
+
+public class ArrayJoinContext {
+  private final ArrayJoinType _type;
+  private final List<Operand> _operands;
+
+  public ArrayJoinContext(ArrayJoinType type, List<Operand> operands) {
+    _type = type;
+    _operands = operands;
+  }
+
+  public ArrayJoinType getType() {
+    return _type;
+  }
+
+  public List<Operand> getOperands() {
+    return _operands;
+  }
+

Review Comment:
   Missing class-level Javadoc for the Operand inner class. Add documentation explaining what an operand represents in the ARRAY JOIN context.
   ```suggestion
   
     /**
      * Represents a single operand in an ARRAY JOIN clause.
      * <p>
      * Each operand defines an {@link ExpressionContext} whose array-valued result is
      * joined/unnested according to the {@link ArrayJoinType}, and an optional alias
      * that names the corresponding output column in the query result.
      */
   ```



##########
pinot-core/src/main/java/org/apache/pinot/core/query/request/context/ArrayJoinContext.java:
##########
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.core.query.request.context;
+
+import java.util.List;
+import javax.annotation.Nullable;
+import org.apache.pinot.common.request.ArrayJoinType;
+import org.apache.pinot.common.request.context.ExpressionContext;
+
+

Review Comment:
   Missing class-level Javadoc. Add documentation explaining the purpose of this class, what it represents in the context of ARRAY JOIN operations, and how it's used in query execution.
   ```suggestion
   /**
    * Context object that captures the logical description of an {@code ARRAY JOIN} clause in a query.
    * <p>
    * An {@code ArrayJoinContext} is created during query parsing and planning to record:
    * <ul>
    *   <li>The {@link ArrayJoinType} indicating how array values should be expanded or combined.</li>
    *   <li>The ordered list of {@link Operand operands}, each wrapping the expression to apply the
    *   ARRAY JOIN to, along with an optional result alias.</li>
    * </ul>
    * Query execution components use this context to drive how array-valued expressions are
    * transformed into individual rows or columns when evaluating ARRAY JOIN operations.
    */
   ```



-- 
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


Re: [PR] Adding v1 operator ARRAY_JOIN [pinot]

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 closed pull request #17182: Adding v1 operator ARRAY_JOIN
URL: https://github.com/apache/pinot/pull/17182


-- 
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