You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "Abacn (via GitHub)" <gi...@apache.org> on 2026/10/20 20:32:36 UTC

[PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Abacn opened a new pull request, #40695:
URL: https://github.com/apache/beam/pull/40695

   - Add `BeamCrossJoinRel` and `BeamCrossJoinRule` to support bounded-by-bounded pure cross joins in Beam Calcite SQL.
   - Extend `BeamCoGBKJoinRule` to split mixed equi/non-equi inner join predicates into an equi-join followed by a post-join `BeamCalcRel` filter.
   - Support `LAG`, `LEAD`, `FIRST_VALUE`, `LAST_VALUE`, `NTH_VALUE` (`RESPECT`/`IGNORE NULLS`), and `CUME_DIST` analytic window functions in `BeamWindowRel` and `BeamBuiltinAnalyticFunctions`, and convert window inputs to `BeamLogicalConvention` in `BeamWindowRule`.
   - Fix `NULLS FIRST` and `NULLS LAST` comparator ordering in `BeamSortRel` when combined with `ASC`/`DESC`.
   - Normalize set operator (`UNION`, `INTERSECT`, `EXCEPT`) input schemas in `BeamSetOperatorRelBase` when inputs differ only by field names or nullability.
   - Return `NULL` instead of `0.0` from `VarianceFn` for empty or single-element sample variance/stddev groups to match SQL standard semantics.
   - Remove workarounds in TPC-DS table schemas used to cast `DECIMAL` to `DOUBLE` for fractional columns
   
   Having these improvements, 55 out of 103 queries now passing (up from 24). Then for test suite,
   
   - add `--queries=supported` and `10M`/`10MB` dataset size support to `TpcdsParametersReader`.
   - Add the Python TPC-DS benchmark and regression test suite (`sdks/python/apache_beam/testing/benchmarks/tpcds`) running on `PrismRunner` and cross-language `SqlTransform`.
   - Update Java TPC-DS GitHub Actions workflows to use `--queries=supported` and add the `beam_PostCommit_Python_Tpcds_Prism.yml` workflow.
   
   <!--
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
    - [ ] Replace these instructions with a description of your change and why you have made it.
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123` or `fixes #456`).
    - [ ] Update `CHANGES.md` with noteworthy changes.
   
   See [CONTRIBUTING.md]() for more 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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #40695:
URL: https://github.com/apache/beam/pull/40695#issuecomment-6302991984

   ## [Codecov](https://app.codecov.io/gh/apache/beam/pull/40695?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.94203%` with `141 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 64.20%. Comparing base ([`76f6e6d`](https://app.codecov.io/gh/apache/beam/commit/76f6e6d7c0c1b2ce582c73d068ad9260cf15c5f3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`0065df1`](https://app.codecov.io/gh/apache/beam/commit/0065df1393b45a3c09f3b618a1a392216b51d729?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 260 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/beam/pull/40695?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...xtensions/sql/impl/rel/BeamSetOperatorRelBase.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2Frel%2FBeamSetOperatorRelBase.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL3JlbC9CZWFtU2V0T3BlcmF0b3JSZWxCYXNlLmphdmE=) | 18.75% | [37 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...l/impl/transform/BeamBuiltinAnalyticFunctions.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2Ftransform%2FBeamBuiltinAnalyticFunctions.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL3RyYW5zZm9ybS9CZWFtQnVpbHRpbkFuYWx5dGljRnVuY3Rpb25zLmphdmE=) | 33.96% | [32 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...eam/sdk/extensions/sql/impl/rel/BeamWindowRel.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2Frel%2FBeamWindowRel.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL3JlbC9CZWFtV2luZG93UmVsLmphdmE=) | 34.88% | [23 Missing and 5 partials :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../sdk/extensions/sql/impl/rel/BeamCrossJoinRel.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2Frel%2FBeamCrossJoinRel.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL3JlbC9CZWFtQ3Jvc3NKb2luUmVsLmphdmE=) | 72.72% | [9 Missing and 6 partials :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...dk/extensions/sql/impl/rule/BeamCoGBKJoinRule.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2Frule%2FBeamCoGBKJoinRule.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL3J1bGUvQmVhbUNvR0JLSm9pblJ1bGUuamF2YQ==) | 81.15% | [4 Missing and 9 partials :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...dk/extensions/sql/impl/rule/BeamCrossJoinRule.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2Frule%2FBeamCrossJoinRule.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL3J1bGUvQmVhbUNyb3NzSm9pblJ1bGUuamF2YQ==) | 84.61% | [1 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...ns/sql/impl/transform/BeamBuiltinAggregations.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2Ftransform%2FBeamBuiltinAggregations.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL3RyYW5zZm9ybS9CZWFtQnVpbHRpbkFnZ3JlZ2F0aW9ucy5qYXZh) | 33.33% | [2 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...m/sdk/extensions/sql/impl/CalciteQueryPlanner.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2FCalciteQueryPlanner.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL0NhbGNpdGVRdWVyeVBsYW5uZXIuamF2YQ==) | 50.00% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...sdk/extensions/sql/impl/schema/BeamTableUtils.java](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&filepath=sdks%2Fjava%2Fextensions%2Fsql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fbeam%2Fsdk%2Fextensions%2Fsql%2Fimpl%2Fschema%2FBeamTableUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9qYXZhL2V4dGVuc2lvbnMvc3FsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9iZWFtL3Nkay9leHRlbnNpb25zL3NxbC9pbXBsL3NjaGVtYS9CZWFtVGFibGVVdGlscy5qYXZh) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/beam/pull/40695?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #40695       +/-   ##
   =============================================
   + Coverage     56.16%   64.20%    +8.03%     
   - Complexity     2288     2358       +70     
   =============================================
     Files          1124      321      -803     
     Lines        178336    15606   -162730     
     Branches       1489     2029      +540     
   =============================================
   - Hits         100170    10020    -90150     
   + Misses        75645     4820    -70825     
   + Partials       2521      766     -1755     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/beam/pull/40695/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [go](https://app.codecov.io/gh/apache/beam/pull/40695/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java](https://app.codecov.io/gh/apache/beam/pull/40695/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `64.20% <65.94%> (-11.59%)` | :arrow_down: |
   | [python](https://app.codecov.io/gh/apache/beam/pull/40695/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 Harness](https://app.codecov.io/gh/apache/beam/pull/40695?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>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40695:
URL: https://github.com/apache/beam/pull/40695#issuecomment-6317930317

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment `assign set of reviewers`


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #40695:
URL: https://github.com/apache/beam/pull/40695#issuecomment-6317832930

   R: @kennknowles 


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4342342342


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamSortRel.java:
##########
@@ -378,9 +378,16 @@ public int compare(Row row1, Row row2) {
         if (isValue1Null && isValue2Null) {
           continue;
         } else if (isValue1Null && !isValue2Null) {
-          fieldRet = -1 * (nullsFirst.get(i) ? -1 : 1);
+          // NULL placement is absolute: NULLS FIRST means the null row always sorts before the

Review Comment:
   changed to a one-line 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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4342344958


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamSortRel.java:
##########
@@ -389,9 +396,17 @@ public int compare(Row row1, Row row2) {
             case BIGINT:
             case FLOAT:
             case DOUBLE:
+            case DECIMAL:
+            case BOOLEAN:
             case VARCHAR:
+            case CHAR:
             case DATE:
+            case TIME:
             case TIMESTAMP:
+              // All of the above map to Java types that implement Comparable (Boolean, BigDecimal,

Review Comment:
   done



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4330015473


##########
.github/workflows/beam_PostCommit_Python_Tpcds_Prism.yml:
##########
@@ -0,0 +1,75 @@
+# 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.
+
+name: PostCommit Python Tpcds Prism
+
+on:
+  schedule:
+    - cron: '30 4/6 * * *'
+  pull_request:
+    paths: ['release/trigger_all_tests.json', '.github/trigger_files/beam_PostCommit_Python_Tpcds_Prism.json']
+  workflow_dispatch:
+
+# Setting explicit permissions for the action
+permissions:
+  actions: write
+  pull-requests: read
+  checks: read
+  contents: read
+  deployments: read
+  id-token: none
+  issues: read
+  discussions: read
+  packages: read
+  pages: read
+  repository-projects: read
+  security-events: read
+  statuses: read
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.event.pull_request.number || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.sender.login }}'
+  cancel-in-progress: true
+
+env:
+  DEVELOCITY_ACCESS_KEY: ${{ secrets.BEAM_DEVELOCITY_ACCESS_KEY }}
+
+jobs:
+  beam_PostCommit_Python_Tpcds_Prism:
+    if: |
+      github.event_name == 'workflow_dispatch' ||
+      github.event_name == 'pull_request' ||
+      (github.event_name == 'schedule' && github.repository == 'apache/beam')
+    runs-on: [self-hosted, ubuntu-24.04, main]
+    timeout-minutes: 60
+    name: ${{ matrix.job_name }}
+    strategy:
+      matrix:
+        job_name: ["beam_PostCommit_Python_Tpcds_Prism"]
+    steps:
+      - uses: actions/checkout@v7
+        with:
+          persist-credentials: false
+      - name: Setup repository
+        uses: ./.github/actions/setup-action
+      - name: Setup environment
+        uses: ./.github/actions/setup-environment-action

Review Comment:
   ## zizmor / 
   
   use GitHub's dedicated self-repository syntax: use '$/...' instead of './...'
   
   [Show more details](https://github.com/apache/beam/security/code-scanning/3505)



##########
.github/workflows/beam_PostCommit_Python_Tpcds_Prism.yml:
##########
@@ -0,0 +1,75 @@
+# 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.
+
+name: PostCommit Python Tpcds Prism
+
+on:
+  schedule:
+    - cron: '30 4/6 * * *'
+  pull_request:
+    paths: ['release/trigger_all_tests.json', '.github/trigger_files/beam_PostCommit_Python_Tpcds_Prism.json']
+  workflow_dispatch:
+
+# Setting explicit permissions for the action
+permissions:
+  actions: write
+  pull-requests: read
+  checks: read
+  contents: read
+  deployments: read
+  id-token: none
+  issues: read
+  discussions: read
+  packages: read
+  pages: read
+  repository-projects: read
+  security-events: read
+  statuses: read
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.event.pull_request.number || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.sender.login }}'
+  cancel-in-progress: true
+
+env:
+  DEVELOCITY_ACCESS_KEY: ${{ secrets.BEAM_DEVELOCITY_ACCESS_KEY }}
+
+jobs:
+  beam_PostCommit_Python_Tpcds_Prism:
+    if: |
+      github.event_name == 'workflow_dispatch' ||
+      github.event_name == 'pull_request' ||
+      (github.event_name == 'schedule' && github.repository == 'apache/beam')
+    runs-on: [self-hosted, ubuntu-24.04, main]
+    timeout-minutes: 60
+    name: ${{ matrix.job_name }}
+    strategy:
+      matrix:
+        job_name: ["beam_PostCommit_Python_Tpcds_Prism"]
+    steps:
+      - uses: actions/checkout@v7
+        with:
+          persist-credentials: false
+      - name: Setup repository
+        uses: ./.github/actions/setup-action

Review Comment:
   ## zizmor / 
   
   use GitHub's dedicated self-repository syntax: use '$/...' instead of './...'
   
   [Show more details](https://github.com/apache/beam/security/code-scanning/3504)



##########
.github/workflows/beam_PostCommit_Python_Tpcds_Prism.yml:
##########
@@ -0,0 +1,75 @@
+# 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.
+
+name: PostCommit Python Tpcds Prism
+
+on:
+  schedule:
+    - cron: '30 4/6 * * *'
+  pull_request:
+    paths: ['release/trigger_all_tests.json', '.github/trigger_files/beam_PostCommit_Python_Tpcds_Prism.json']
+  workflow_dispatch:
+
+# Setting explicit permissions for the action
+permissions:
+  actions: write
+  pull-requests: read
+  checks: read
+  contents: read
+  deployments: read
+  id-token: none
+  issues: read
+  discussions: read
+  packages: read
+  pages: read
+  repository-projects: read
+  security-events: read
+  statuses: read
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.event.pull_request.number || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.sender.login }}'
+  cancel-in-progress: true
+
+env:
+  DEVELOCITY_ACCESS_KEY: ${{ secrets.BEAM_DEVELOCITY_ACCESS_KEY }}
+
+jobs:
+  beam_PostCommit_Python_Tpcds_Prism:
+    if: |
+      github.event_name == 'workflow_dispatch' ||
+      github.event_name == 'pull_request' ||
+      (github.event_name == 'schedule' && github.repository == 'apache/beam')
+    runs-on: [self-hosted, ubuntu-24.04, main]
+    timeout-minutes: 60
+    name: ${{ matrix.job_name }}
+    strategy:
+      matrix:
+        job_name: ["beam_PostCommit_Python_Tpcds_Prism"]
+    steps:
+      - uses: actions/checkout@v7
+        with:
+          persist-credentials: false
+      - name: Setup repository
+        uses: ./.github/actions/setup-action
+      - name: Setup environment
+        uses: ./.github/actions/setup-environment-action
+        with:
+          python-version: default
+          go-version: default
+      - name: Run full TPC-DS suite on PrismRunner with regression check
+        uses: ./.github/actions/gradle-command-self-hosted-action

Review Comment:
   ## zizmor / 
   
   use GitHub's dedicated self-repository syntax: use '$/...' instead of './...'
   
   [Show more details](https://github.com/apache/beam/security/code-scanning/3506)



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "kennknowles (via GitHub)" <gi...@apache.org>.
kennknowles commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4350344192


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamCrossJoinRel.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * 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.beam.sdk.extensions.sql.impl.rel;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.transforms.View;
+import org.apache.beam.sdk.transforms.windowing.TimestampCombiner;
+import org.apache.beam.sdk.transforms.windowing.Window;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollectionList;
+import org.apache.beam.sdk.values.PCollectionView;
+import org.apache.beam.sdk.values.Row;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.plan.RelOptCluster;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.plan.RelTraitSet;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.RelNode;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.CorrelationId;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.Join;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.JoinRelType;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rex.RexNode;
+
+/**
+ * A {@code BeamJoinRel} that implements a BOUNDED cartesian (CROSS) join, used for the literal-TRUE
+ * join conditions that Calcite emits when it decorrelates uncorrelated scalar / IN / EXISTS
+ * subqueries and lateral joins.
+ *
+ * <p>Only supported when BOTH inputs are bounded. The right side is broadcast as a side input and
+ * the left side is iterated; every (left, right) pair is emitted as one combined row (left values
+ * followed by right values).
+ *
+ * <p>First increment: INNER join with an always-true condition. A non-trivial (residual) condition
+ * is not yet evaluated here.
+ */
+@SuppressWarnings({

Review Comment:
   Targeted methods are fine, just not whole-class. When the whole file is suppressed the code gradually gets more problems that are harder to remove later.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4342347770


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamWindowRel.java:
##########
@@ -142,9 +143,37 @@ public PTransform<PCollectionList<Row>, PCollection<Row>> buildPTransform() {
                         List<Integer> argList = anAggCall.getArgList();
                         Schema.Field field =
                             CalciteUtils.toField(anAggCall.getName(), anAggCall.getType());
-                        Combine.CombineFn combineFn =
-                            AggregationCombineFnAdapter.createCombineFnAnalyticsFunctions(
-                                anAggCall, field, anAggCall.getAggregation().getName());
+                        String aggName = anAggCall.getAggregation().getName();
+                        Combine.CombineFn combineFn;
+                        if (anAggCall.ignoreNulls()
+                            && ("FIRST_VALUE".equals(aggName) || "LAST_VALUE".equals(aggName))) {
+                          // Spark's first(col, ignoreNulls=true) / last(col, ignoreNulls=true)

Review Comment:
   cleaned up comments mentioning "Spark"



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "kennknowles (via GitHub)" <gi...@apache.org>.
kennknowles commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4339925723


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamCrossJoinRel.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * 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.beam.sdk.extensions.sql.impl.rel;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.transforms.View;
+import org.apache.beam.sdk.transforms.windowing.TimestampCombiner;
+import org.apache.beam.sdk.transforms.windowing.Window;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollectionList;
+import org.apache.beam.sdk.values.PCollectionView;
+import org.apache.beam.sdk.values.Row;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.plan.RelOptCluster;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.plan.RelTraitSet;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.RelNode;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.CorrelationId;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.Join;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.JoinRelType;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rex.RexNode;
+
+/**
+ * A {@code BeamJoinRel} that implements a BOUNDED cartesian (CROSS) join, used for the literal-TRUE
+ * join conditions that Calcite emits when it decorrelates uncorrelated scalar / IN / EXISTS
+ * subqueries and lateral joins.
+ *
+ * <p>Only supported when BOTH inputs are bounded. The right side is broadcast as a side input and
+ * the left side is iterated; every (left, right) pair is emitted as one combined row (left values
+ * followed by right values).
+ *
+ * <p>First increment: INNER join with an always-true condition. A non-trivial (residual) condition
+ * is not yet evaluated here.
+ */
+@SuppressWarnings({

Review Comment:
   Can we leave this out of new files



##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamSortRel.java:
##########
@@ -378,9 +378,16 @@ public int compare(Row row1, Row row2) {
         if (isValue1Null && isValue2Null) {
           continue;
         } else if (isValue1Null && !isValue2Null) {
-          fieldRet = -1 * (nullsFirst.get(i) ? -1 : 1);
+          // NULL placement is absolute: NULLS FIRST means the null row always sorts before the

Review Comment:
   This comment is excessively verbose for the little fix.



##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamWindowRel.java:
##########
@@ -208,8 +261,12 @@ public FieldAggregation(
 
   @Override
   public NodeStats estimateNodeStats(BeamRelMetadataQuery mq) {
-    NodeStats inputStat = BeamSqlRelUtils.getNodeStats(this.input, mq);
-    return inputStat;
+    // Derive from the planner's row-count for the input, which stays finite even when the input is

Review Comment:
   This comment is complex and refers to all sorts of things elsewhere, and is just a comment on why the change was made, not explaining the current code.



##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamSortRel.java:
##########
@@ -389,9 +396,17 @@ public int compare(Row row1, Row row2) {
             case BIGINT:
             case FLOAT:
             case DOUBLE:
+            case DECIMAL:
+            case BOOLEAN:
             case VARCHAR:
+            case CHAR:
             case DATE:
+            case TIME:
             case TIMESTAMP:
+              // All of the above map to Java types that implement Comparable (Boolean, BigDecimal,

Review Comment:
   This comment is redundant with the code



##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamWindowRel.java:
##########
@@ -142,9 +143,37 @@ public PTransform<PCollectionList<Row>, PCollection<Row>> buildPTransform() {
                         List<Integer> argList = anAggCall.getArgList();
                         Schema.Field field =
                             CalciteUtils.toField(anAggCall.getName(), anAggCall.getType());
-                        Combine.CombineFn combineFn =
-                            AggregationCombineFnAdapter.createCombineFnAnalyticsFunctions(
-                                anAggCall, field, anAggCall.getAggregation().getName());
+                        String aggName = anAggCall.getAggregation().getName();
+                        Combine.CombineFn combineFn;
+                        if (anAggCall.ignoreNulls()
+                            && ("FIRST_VALUE".equals(aggName) || "LAST_VALUE".equals(aggName))) {
+                          // Spark's first(col, ignoreNulls=true) / last(col, ignoreNulls=true)

Review Comment:
   This is more general than spark, as it is for TCP-DS



##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamWindowRel.java:
##########
@@ -220,10 +277,12 @@ public NodeStats estimateNodeStats(BeamRelMetadataQuery mq) {
    */
   @Override
   public BeamCostModel beamComputeSelfCost(RelOptPlanner planner, BeamRelMetadataQuery mq) {
-    NodeStats inputStat = BeamSqlRelUtils.getNodeStats(this.input, mq);
+    // Use the planner's row-count (RelSubset-safe) rather than BeamSqlRelUtils.getNodeStats, which

Review Comment:
   I wonder if `BeamSqlrelUtils.getNodeStats` should be changed, if we are replacing it with all these trivial inlines. FWIW this comment is actually an OK explanation for the code.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #40695:
URL: https://github.com/apache/beam/pull/40695#issuecomment-6317829572

   PreCommit SQL Java17 failing errorprone in HEAD, not related to this change


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40695:
URL: https://github.com/apache/beam/pull/40695#issuecomment-6305068420

   Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment `assign set of reviewers`


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4342338832


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamCrossJoinRel.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * 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.beam.sdk.extensions.sql.impl.rel;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.transforms.View;
+import org.apache.beam.sdk.transforms.windowing.TimestampCombiner;
+import org.apache.beam.sdk.transforms.windowing.Window;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PCollectionList;
+import org.apache.beam.sdk.values.PCollectionView;
+import org.apache.beam.sdk.values.Row;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.plan.RelOptCluster;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.plan.RelTraitSet;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.RelNode;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.CorrelationId;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.Join;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rel.core.JoinRelType;
+import org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.rex.RexNode;
+
+/**
+ * A {@code BeamJoinRel} that implements a BOUNDED cartesian (CROSS) join, used for the literal-TRUE
+ * join conditions that Calcite emits when it decorrelates uncorrelated scalar / IN / EXISTS
+ * subqueries and lateral joins.
+ *
+ * <p>Only supported when BOTH inputs are bounded. The right side is broadcast as a side input and
+ * the left side is iterated; every (left, right) pair is emitted as one combined row (left values
+ * followed by right values).
+ *
+ * <p>First increment: INNER join with an always-true condition. A non-trivial (residual) condition
+ * is not yet evaluated here.
+ */
+@SuppressWarnings({

Review Comment:
   This one is actually needed, moved to a targeted method (processElement) with a comment. Also removed a `suppressWarning` in VarianceFn



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4342366210


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamWindowRel.java:
##########
@@ -220,10 +277,12 @@ public NodeStats estimateNodeStats(BeamRelMetadataQuery mq) {
    */
   @Override
   public BeamCostModel beamComputeSelfCost(RelOptPlanner planner, BeamRelMetadataQuery mq) {
-    NodeStats inputStat = BeamSqlRelUtils.getNodeStats(this.input, mq);
+    // Use the planner's row-count (RelSubset-safe) rather than BeamSqlRelUtils.getNodeStats, which

Review Comment:
   acked. This could be a future improvement



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #40695:
URL: https://github.com/apache/beam/pull/40695#discussion_r4342356285


##########
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamWindowRel.java:
##########
@@ -208,8 +261,12 @@ public FieldAggregation(
 
   @Override
   public NodeStats estimateNodeStats(BeamRelMetadataQuery mq) {
-    NodeStats inputStat = BeamSqlRelUtils.getNodeStats(this.input, mq);
-    return inputStat;
+    // Derive from the planner's row-count for the input, which stays finite even when the input is

Review Comment:
   changed to a one-line 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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Expand Beam SQL TPC-DS query support and add Python TPC-DS suite [beam]

Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn merged PR #40695:
URL: https://github.com/apache/beam/pull/40695


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org