Skip to content

Commit

Permalink
Merge branch 'main' into csv_format
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime authored Aug 6, 2024
2 parents 7e82a71 + 9af2d66 commit 08b4d72
Show file tree
Hide file tree
Showing 17 changed files with 585 additions and 38 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.34.0
- uses: bufbuild/buf-setup-action@v1.35.1
with:
github_token: ${{ github.token }}
- run: buf format --diff --exit-code
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.34.0
- uses: bufbuild/buf-setup-action@v1.35.1
with:
github_token: ${{ github.token }}
- uses: bufbuild/buf-lint-action@v1
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: bufbuild/buf-setup-action@v1.34.0
- uses: bufbuild/buf-setup-action@v1.35.1
- uses: actions/setup-node@v4
with:
node-version: "20"
Expand All @@ -93,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.34.0
- uses: bufbuild/buf-setup-action@v1.35.1
- name: Run proto-prefix.py
run: tools/proto_prefix.py output test proto go_package=github.com/test/proto
- name: Modify buf config to build rewritten proto files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_breaking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.34.0
- uses: bufbuild/buf-setup-action@v1.35.1
with:
github_token: ${{ github.token }}
- name: check for breaking changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
node-version: "20"

- uses: bufbuild/buf-setup-action@v1.34.0
- uses: bufbuild/buf-setup-action@v1.35.1
with:
github_token: ${{ github.token }}

Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
Release Notes
---

## [0.53.0](https://github.com/substrait-io/substrait/compare/v0.52.0...v0.53.0) (2024-08-04)

### ⚠ BREAKING CHANGES

* PrecisionTimestamp(Tz) literal's value is now int64
instead of uint64

### Features

* add aggregate count functions with decimal return type ([#670](https://github.com/substrait-io/substrait/issues/670)) ([2aa516b](https://github.com/substrait-io/substrait/commit/2aa516bff3b2cc3e5ad262152c98f1d9b15c6765))
* add arithmetic function "sqrt" and "factorial" with decimal type ([#674](https://github.com/substrait-io/substrait/issues/674)) ([e4f5b68](https://github.com/substrait-io/substrait/commit/e4f5b68981953d3546835572ce566e9586d497be))
* add arithmetic function for bitwise(AND/OR/XOR) operation with decimal arguments ([#675](https://github.com/substrait-io/substrait/issues/675)) ([a70cf72](https://github.com/substrait-io/substrait/commit/a70cf72425c3a0eed432238c2a8afedab1cc025b))
* add logarithmic functions with decimal type args ([#669](https://github.com/substrait-io/substrait/issues/669)) ([d9fb1e3](https://github.com/substrait-io/substrait/commit/d9fb1e355e0b378e1b6460f256d724a3aae931d3))
* add precision timestamp datetime fn variants ([#666](https://github.com/substrait-io/substrait/issues/666)) ([60c93d2](https://github.com/substrait-io/substrait/commit/60c93d28c8e4df3174ba6b3f687a30d256acdcae))
* clarify the meaning of plans ([#616](https://github.com/substrait-io/substrait/issues/616)) ([c1553df](https://github.com/substrait-io/substrait/commit/c1553dfafa09de1b2441cdb1d22a251a675419a7)), closes [#612](https://github.com/substrait-io/substrait/issues/612) [#613](https://github.com/substrait-io/substrait/issues/613)

### Bug Fixes

* use int64 instead of uint64 for PrecisionTimestamp(Tz) literal value ([#668](https://github.com/substrait-io/substrait/issues/668)) ([da3c74e](https://github.com/substrait-io/substrait/commit/da3c74eccc4978bdaeca4760e98a77aff560e19b))

## [0.52.0](https://github.com/substrait-io/substrait/compare/v0.51.0...v0.52.0) (2024-07-14)

### ⚠ BREAKING CHANGES

* changes the message type for Literal PrecisionTimestamp
and PrecisionTimestampTZ

The PrecisionTimestamp and PrecisionTimestampTZ literals were introduced

### Bug Fixes

* include precision information in PrecisionTimestamp and PrecisionTimestampTZ literals ([#659](https://github.com/substrait-io/substrait/issues/659)) ([f9e5f9c](https://github.com/substrait-io/substrait/commit/f9e5f9c515d4b8be079bc7d9dfcd89a6fa5e6c7e)), closes [#594](https://github.com/substrait-io/substrait/issues/594) [/github.com/substrait-io/substrait/pull/594#discussion_r1471844566](https://github.com/substrait-io//github.com/substrait-io/substrait/pull/594/issues/discussion_r1471844566)

## [0.51.0](https://github.com/substrait-io/substrait/compare/v0.50.0...v0.51.0) (2024-07-07)

### Features

* add "initcap" function ([#656](https://github.com/substrait-io/substrait/issues/656)) ([95bc6ba](https://github.com/substrait-io/substrait/commit/95bc6ba0ca5056274ccc81608919de22032084ad)), closes [/github.com/Blizzara/substrait/blob/70d1eb71623ca0754157dd5d87348bae51d420c4/extensions/functions_string.yaml#L1023](https://github.com/substrait-io//github.com/Blizzara/substrait/blob/70d1eb71623ca0754157dd5d87348bae51d420c4/extensions/functions_string.yaml/issues/L1023)
* add null input handling options for `any_value` ([#652](https://github.com/substrait-io/substrait/issues/652)) ([1890e6a](https://github.com/substrait-io/substrait/commit/1890e6a7814c5161f38a31aba3e284dde1bc79d4))
* allow naming/aliasing relations ([#649](https://github.com/substrait-io/substrait/issues/649)) ([4cf8108](https://github.com/substrait-io/substrait/commit/4cf8108e0746bbe6d6cf5ea95a6a5276580e0dde)), closes [#648](https://github.com/substrait-io/substrait/issues/648) [#571](https://github.com/substrait-io/substrait/issues/571)
* define SetRel output nullability derivation ([#558](https://github.com/substrait-io/substrait/issues/558)) ([#654](https://github.com/substrait-io/substrait/issues/654)) ([612123a](https://github.com/substrait-io/substrait/commit/612123a4a84cf9554e0b8f92671ea5159c6deb21))

## [0.50.0](https://github.com/substrait-io/substrait/compare/v0.49.0...v0.50.0) (2024-06-30)

### ⚠ BREAKING CHANGES
Expand Down
41 changes: 41 additions & 0 deletions extensions/functions_aggregate_decimal_output.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
%YAML 1.2
---
aggregate_functions:
- name: "count"
description: Count a set of values. Result is returned as a decimal instead of i64.
impls:
- args:
- name: x
value: any
options:
overflow:
values: [SILENT, SATURATE, ERROR]
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: decimal<38,0>
return: decimal<38,0>
- name: "count"
description: "Count a set of records (not field referenced). Result is returned as a decimal instead of i64."
impls:
- options:
overflow:
values: [SILENT, SATURATE, ERROR]
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: decimal<38,0>
return: decimal<38,0>
- name: "approx_count_distinct"
description: >-
Calculates the approximate number of rows that contain distinct values of the expression argument using
HyperLogLog. This function provides an alternative to the COUNT (DISTINCT expression) function, which
returns the exact number of rows that contain distinct values of an expression. APPROX_COUNT_DISTINCT
processes large amounts of data significantly faster than COUNT, with negligible deviation from the exact
result. Result is returned as a decimal instead of i64.
impls:
- args:
- name: x
value: any
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: binary
return: decimal<38,0>
9 changes: 7 additions & 2 deletions extensions/functions_aggregate_generic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ aggregate_functions:
impls:
- args:
- name: x
value: any
value: any1
options:
ignore_nulls:
values: [ "TRUE", "FALSE" ]
nullability: DECLARED_OUTPUT
return: any?
decomposable: MANY
intermediate: any1?
return: any1?
74 changes: 73 additions & 1 deletion extensions/functions_arithmetic_decimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,86 @@ scalar_functions:
scale_after_borrow = max(init_scale - delta, min_scale)
scale = init_prec > 38 ? scale_after_borrow : init_scale
DECIMAL<prec, scale>
-
-
name: "abs"
description: Calculate the absolute value of the argument.
impls:
- args:
- name: x
value: decimal<P,S>
return: decimal<P,S>
- name: "bitwise_and"
description: >
Return the bitwise AND result for two decimal inputs.
In inputs scale must be 0 (i.e. only integer types are allowed)
impls:
- args:
- name: x
value: "DECIMAL<P1,0>"
- name: y
value: "DECIMAL<P2,0>"
return: |-
max_precision = max(P1, P2)
DECIMAL<max_precision, 0>
- name: "bitwise_or"
description: >
Return the bitwise OR result for two given decimal inputs.
In inputs scale must be 0 (i.e. only integer types are allowed)
impls:
- args:
- name: x
value: "DECIMAL<P1,0>"
- name: y
value: "DECIMAL<P2,0>"
return: |-
max_precision = max(P1, P2)
DECIMAL<max_precision, 0>
- name: "bitwise_xor"
description: >
Return the bitwise XOR result for two given decimal inputs.
In inputs scale must be 0 (i.e. only integer types are allowed)
impls:
- args:
- name: x
value: "DECIMAL<P1,0>"
- name: y
value: "DECIMAL<P2,0>"
return: |-
max_precision = max(P1, P2)
DECIMAL<max_precision, 0>
- name: "sqrt"
description: Square root of the value. Sqrt of 0 is 0 and sqrt of negative values will raise an error.
impls:
- args:
- name: x
value: "DECIMAL<P,S>"
return: fp64
- name: "factorial"
description: >
Return the factorial of a given decimal input. Scale should be 0 for factorial decimal input.
The factorial of 0! is 1 by convention. Negative inputs will raise an error.
Input which cause overflow of result will raise an error.
impls:
- args:
- name: "n"
value: "DECIMAL<P,0>"
return: "DECIMAL<38,0>"
-
name: "power"
description: "Take the power with x as the base and y as exponent.
Behavior for complex number result is indicated by option complex_number_result"
impls:
- args:
- name: x
value: "DECIMAL<P1,S1>"
- name: y
value: "DECIMAL<P2,S2>"
options:
overflow:
values: [ SILENT, SATURATE, ERROR ]
complex_number_result:
values: [ NAN, ERROR ]
return: fp64

aggregate_functions:
- name: "sum"
Expand Down
Loading

0 comments on commit 08b4d72

Please sign in to comment.