From ba3344fb1d9dcd0c922eb42649c734da416d126b Mon Sep 17 00:00:00 2001 From: Krishna Pai Date: Fri, 12 Apr 2024 08:36:29 -0700 Subject: [PATCH] Making changes as per comments. --- .github/workflows/scheduled.yml | 18 +++++++++--------- scripts/signature.py | 4 ++-- .../prestosql/aggregates/SumAggregate.cpp | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 8b98d11f07168..f8bbb66ac736f 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -150,14 +150,14 @@ jobs: mkdir -p /tmp/signatures - name: Checkout Main - if: ${{ github.even_name != 'schedule' && steps.get-sig.outputs.stash-hit != 'true' }} + if: ${{ github.event_name != 'schedule' && steps.get-sig.outputs.stash-hit != 'true' }} uses: actions/checkout@v4 with: ref: ${{ steps.get-head.outputs.head_main || 'main' }} path: velox_main - name: Build PyVelox - if: ${{ github.even_name != 'schedule' && steps.get-sig.outputs.stash-hit != 'true' }} + if: ${{ github.event_name != 'schedule' && steps.get-sig.outputs.stash-hit != 'true' }} working-directory: velox_main run: | python3 -m venv .venv @@ -166,7 +166,7 @@ jobs: make python-build - name: Create Baseline Signatures - if: ${{ github.even_name != 'schedule' && steps.get-sig.outputs.stash-hit != 'true' }} + if: ${{ github.event_name != 'schedule' && steps.get-sig.outputs.stash-hit != 'true' }} working-directory: velox_main run: | source .venv/bin/activate @@ -176,7 +176,7 @@ jobs: python3 scripts/signature.py export_aggregates --presto /tmp/signatures/presto_aggregate_signatures_main.json - name: Save Function Signature Stash - if: ${{ github.even_name == 'pull_request' && steps.get-sig.outputs.stash-hit != 'true' }} + if: ${{ github.event_name == 'pull_request' && steps.get-sig.outputs.stash-hit != 'true' }} uses: assignUser/stash/save@v1 with: path: /tmp/signatures @@ -206,14 +206,14 @@ jobs: - name: Save ccache # see https://github.com/actions/upload-artifact/issues/543 continue-on-error: true - if: ${{ github.even_name != 'schedule' }} + if: ${{ github.event_name != 'schedule' }} uses: assignUser/stash/save@v1 with: path: "${{ env.CCACHE_DIR }}" key: ccache-fuzzer-centos - name: Build PyVelox - if: ${{ github.even_name != 'schedule' }} + if: ${{ github.event_name != 'schedule' }} env: VELOX_BUILD_DIR: "_build/debug" run: | @@ -222,7 +222,7 @@ jobs: python3 -m pip install -e . - name: Create and test new function signatures - if: ${{ github.even_name != 'schedule' }} + if: ${{ github.event_name != 'schedule' }} id: sig-check run: | source .venv/bin/activate @@ -234,7 +234,7 @@ jobs: /tmp/signatures/presto_aggregate_errors - name: Upload Signature Artifacts - if: ${{ github.even_name != 'schedule' }} + if: ${{ github.event_name != 'schedule' }} uses: actions/upload-artifact@v4 with: name: signatures @@ -254,7 +254,7 @@ jobs: done - name: Save Function Signature Stash - if: ${{ github.even_name == 'push' }} + if: ${{ github.event_name == 'push' }} uses: assignUser/stash/save@v1 with: path: /tmp/signatures diff --git a/scripts/signature.py b/scripts/signature.py index 79ca17a4093d0..9a96189ec17be 100644 --- a/scripts/signature.py +++ b/scripts/signature.py @@ -230,7 +230,7 @@ def bias_aggregates(args): base_signatures, contender_signatures, args.error_path ) - set_gh_output(f"presto_aggregate_error", status == 1) + set_gh_output("presto_aggregate_error", status == 1) if not delta: print(f"{bcolors.BOLD} No changes detected: Nothing to do!") @@ -251,7 +251,7 @@ def bias_aggregates(args): with open(args.output_path, "w") as f: print(f"{biased_functions}", file=f, end="") - set_gh_output(f"presto_aggregate_functions", True) + set_gh_output("presto_aggregate_functions", True) def gh_bias_check(args): diff --git a/velox/functions/prestosql/aggregates/SumAggregate.cpp b/velox/functions/prestosql/aggregates/SumAggregate.cpp index 7e5e6e059f558..e905f59871c12 100644 --- a/velox/functions/prestosql/aggregates/SumAggregate.cpp +++ b/velox/functions/prestosql/aggregates/SumAggregate.cpp @@ -48,7 +48,7 @@ exec::AggregateRegistrationResult registerSum( .build(), }; - for (const auto& inputType : {"tintyint", "smallint", "integer", "bigint"}) { + for (const auto& inputType : {"tinyint", "smallint", "integer", "bigint"}) { signatures.push_back(exec::AggregateFunctionSignatureBuilder() .returnType("bigint") .intermediateType("bigint")