Skip to content

Commit

Permalink
Merge branch 'main' into docoverhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime authored Oct 19, 2023
2 parents ac6f66d + c776fda commit 4d42ac8
Show file tree
Hide file tree
Showing 7 changed files with 232 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

* @jacques-n @cpcloud @westonpace
* @jacques-n @cpcloud @westonpace @epsilonprime @vbarua
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.26.1
- uses: bufbuild/buf-setup-action@v1.27.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.26.1
- uses: bufbuild/buf-setup-action@v1.27.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.26.1
- uses: bufbuild/buf-setup-action@v1.27.1
- uses: actions/setup-node@v3
with:
node-version: "18"
Expand All @@ -93,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.26.1
- uses: bufbuild/buf-setup-action@v1.27.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.26.1
- uses: bufbuild/buf-setup-action@v1.27.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: "18"

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

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

## [0.36.0](https://github.com/substrait-io/substrait/compare/v0.35.0...v0.36.0) (2023-10-08)


### Features

* geometry processing functions ([#556](https://github.com/substrait-io/substrait/issues/556)) ([8406cf6](https://github.com/substrait-io/substrait/commit/8406cf6753b97829b2b5211344822d6f2f840eab))

## [0.35.0](https://github.com/substrait-io/substrait/compare/v0.34.0...v0.35.0) (2023-10-01)


### ⚠ BREAKING CHANGES

* nullability of is_not_distinct_from has changed
* The minimum precision for floating point numbers is
now mandated.

### Features

* add approval guidelines for documentation updates ([#553](https://github.com/substrait-io/substrait/issues/553)) ([da4b32a](https://github.com/substrait-io/substrait/commit/da4b32ac41827ae8b53a2833ec34872670904e57))
* add geometric data types and functions ([#543](https://github.com/substrait-io/substrait/issues/543)) ([db52bbd](https://github.com/substrait-io/substrait/commit/db52bbd844f7d8db328f1b6f00758f07009ca95b))
* add geometry editor functions ([#554](https://github.com/substrait-io/substrait/issues/554)) ([727467c](https://github.com/substrait-io/substrait/commit/727467cc66f4c4984c7a8ea1205a473644f00b23))
* adding geometry accessor functions ([#552](https://github.com/substrait-io/substrait/issues/552)) ([784fa9b](https://github.com/substrait-io/substrait/commit/784fa9b1702a1df64a8286a25fce377a0aa29fd4))
* explicitly reference IEEE 754 and mandate precision as well as range ([#449](https://github.com/substrait-io/substrait/issues/449)) ([54e3d52](https://github.com/substrait-io/substrait/commit/54e3d52bc07c8952af86f57250253d10a97dadc3)), closes [#447](https://github.com/substrait-io/substrait/issues/447)


### Bug Fixes

* specify nullability for is_not_distinct_from ([#555](https://github.com/substrait-io/substrait/issues/555)) ([30773b2](https://github.com/substrait-io/substrait/commit/30773b2fcb67413625535cd1ada144dccfdcde22))

## [0.34.0](https://github.com/substrait-io/substrait/compare/v0.33.0...v0.34.0) (2023-09-17)


Expand Down
81 changes: 81 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Code of Conduct

We believe in creating a diverse, inclusive, and accessible environment for
contributors in order to create the best software. To achieve this we expect
everyone who participates in the project to observe the following guidelines.

## Guidelines

These guidelines are not exhaustive or complete.

### Be open

We invite anyone to participate in our community. We prefer to use public methods of communication only. We are patient in discussion and know that
people come from various time zones and may not be able to respond immediately.
We know that significant decisions should not occur on fast-paced
communication channels like Slack.

We do not hide our intentions. We have many reasons to work on this project
and many of us are paid for our work and will profit from the success of the
project. We are transparent with our goals and our reasoning.

We are honest and we promptly admit to our mistakes while being understanding that others may also make mistakes.

### Be respectful

We show respect for others in all of our communications. We practice empathy
and we always try to understand what the other person is telling us. We are
willing to challenge our own understanding and adapt it when needed.

We always assume good faith unless there is clear evidence to the contrary.
We assume that others working on this project have the same goal in mind and
that their intentions are genuine.

We respect the way that contributors name and describe themselves. When
others express a preference for particular names or pronouns then we are
mindful of this fact and use these words when communicating with or about
the person.

### Be collaborative

We understand that this project is created for everyone and not just ourselves.
We explain our work to others and encourage others to expand on our work. We
recognize that decisions we make will affect others and we take those
consequences seriously when making these decisions.

We help newcomers integrate into the project, mentor them, and point them
towards appropriate resources. We do our best to learn answers before we ask questions. We recognize and credit the work done by contributors. We thank
others for their hard work and give credit where it is due.

## Unacceptable Behavior

The following specific behaviors are unacceptable and will not be tolerated.

* Insults: This includes name calling, using slurs or stereotypes, and any attacks based on personal characteristics
* Sexual harassment: Sexual attention or advances of any kind towards others where the person knows or reasonably should know that the attention is unwelcome or in situations where consent cannot be communicated.
* Sexist, racist, or otherwise discriminatory jokes and language.
* Posting sexually explicit or violent material.
* Posting (or threatening to post) other people's personally identifying information ("doxing") or private content.
* Excessive or unnecessary profanity.
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
* Trolling: Deliberately disrupting conversations or posting in bad-faith to intentionally provoke.
* Advocating for, or encouraging, any of the above behaviour.

## Reporting Guidelines

We all work together to help others identify and call out instances where
our code of conduct is not being observed. We remember to assume good faith
and recognize that contributors may be having a bad day or may not be aware
their behavior violates the code of conduct. Often, calling attention to
negative behavior is sufficient to resolve the issue.

When a situation becomes difficult to resolve or we feel that the conversation
is getting out of control we can email the SMC at [email protected].

## Acknowledgements

This statement draws on the following for content and inspiration:

* [The Apache Software Foundation code of conduct](https://www.apache.org/foundation/policies/conduct.html)
* [Wikimedia's Universal Code of Conduct](https://meta.wikimedia.org/wiki/Universal_Code_of_Conduct)

127 changes: 115 additions & 12 deletions extensions/functions_geometry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ scalar_functions:
value: fp64
return: u!geometry
-
name: "makeline"
name: "make_line"
description: >
Returns a linestring connecting the endpoint of geometry `x` to the begin point of
geometry `y`. Repeated points at the beginning of input geometries are collapsed to a single point.
Returns a linestring connecting the endpoint of geometry `geom1` to the begin point of
geometry `geom2`. Repeated points at the beginning of input geometries are collapsed to a single point.
A linestring can be closed or simple. A closed linestring starts and ends on the same
point. A simple linestring does not cross or touch itself.
impls:
- args:
- name: x
- name: geom1
value: u!geometry
- name: y
- name: geom2
value: u!geometry
return: u!geometry
-
Expand All @@ -43,7 +43,7 @@ scalar_functions:
value: u!geometry
return: fp64
-
name: "y_coodinate"
name: "y_coordinate"
description: >
Return the y coordinate of the point. Return null if not available.
impls:
Expand All @@ -52,7 +52,7 @@ scalar_functions:
value: u!geometry
return: fp64
-
name: "numpoints"
name: "num_points"
description: >
Return the number of points in the geometry. The geometry should be an linestring
or circularstring.
Expand All @@ -62,7 +62,7 @@ scalar_functions:
value: u!geometry
return: i64
-
name: "isempty"
name: "is_empty"
description: >
Return true is the geometry is an empty geometry.
impls:
Expand All @@ -71,7 +71,7 @@ scalar_functions:
value: u!geometry
return: boolean
-
name: "isclosed"
name: "is_closed"
description: >
Return true if the geometry's start and end points are the same.
impls:
Expand All @@ -80,7 +80,7 @@ scalar_functions:
value: geometry
return: boolean
-
name: "issimple"
name: "is_simple"
description: >
Return true if the geometry does not self intersect.
impls:
Expand All @@ -89,7 +89,7 @@ scalar_functions:
value: u!geometry
return: boolean
-
name: "isring"
name: "is_ring"
description: >
Return true if the geometry's start and end points are the same and it does not self
intersect.
Expand All @@ -99,7 +99,7 @@ scalar_functions:
value: u!geometry
return: boolean
-
name: "geometrytype"
name: "geometry_type"
description: >
Return the type of geometry as a string.
impls:
Expand All @@ -126,6 +126,7 @@ scalar_functions:
return the largest dimension from the collection. Dimensionality is determined by
the complexity of the input and not the coordinate system being used.
Type dimensions:
POINT - 0
LINE - 1
POLYGON - 2
Expand All @@ -134,3 +135,105 @@ scalar_functions:
- name: geom
value: u!geometry
return: i8
-
name: "is_valid"
description: >
Return true if the input geometry is a valid 2D geometry.
For 3 dimensional and 4 dimensional geometries, the validity is still only tested
in 2 dimensions.
impls:
- args:
- name: geom
value: u!geometry
return: boolean
-
name: "collection_extract"
description: >
Given the input geometry collection, return a homogenous multi-geometry. All geometries
in the multi-geometry will have the same dimension.
If type is not specified, the multi-geometry will only contain geometries of the highest
dimension. If type is specified, the multi-geometry will only contain geometries
of that type. If there are no geometries of the specified type, an empty geometry
is returned. Only points, linestrings, and polygons are supported.
Type numbers:
POINT - 0
LINE - 1
POLYGON - 2
impls:
- args:
- name: geom_collection
value: u!geometry
return: u!geometry
- args:
- name: geom_collection
value: u!geometry
- name: type
value: i8
return: u!geometry
-
name: "flip_coordinates"
description: >
Return a version of the input geometry with the X and Y axis flipped.
This operation can be performed on geometries with more than 2 dimensions. However,
only X and Y axis will be flipped.
impls:
- args:
- name: geom_collection
value: u!geometry
return: u!geometry
-
name: "remove_repeated_points"
description: >
Return a version of the input geometry with duplicate consecutive points removed.
If the `tolerance` argument is provided, consecutive points within the tolerance
distance of one another are considered to be duplicates.
impls:
- args:
- name: geom
value: u!geometry
return: u!geometry
- args:
- name: geom
value: u!geometry
- name: tolerance
value: fp64
return: u!geometry
-
name: "buffer"
description: >
Compute and return an expanded version of the input geometry. All the points
of the returned geometry are at a distance of `buffer_radius` away from the points
of the input geometry. If a negative `buffer_radius` is provided, the geometry will
shrink instead of expand. A negative `buffer_radius` may shrink the geometry completely,
in which case an empty geometry is returned. For input the geometries of points or lines,
a negative `buffer_radius` will always return an emtpy geometry.
impls:
- args:
- name: geom
value: u!geometry
- name: buffer_radius
value: fp64
return: u!geometry
-
name: "centroid"
description: >
Return a point which is the geometric center of mass of the input geometry.
impls:
- args:
- name: geom
value: u!geometry
return: u!geometry
-
name: "minimum_bounding_circle"
description: >
Return the smallest circle polygon that contains the input geometry.
impls:
- args:
- name: geom
value: u!geometry
return: u!geometry

0 comments on commit 4d42ac8

Please sign in to comment.