Skip to content

Conversation

@jesspav
Copy link
Collaborator

@jesspav jesspav commented Nov 14, 2025

Adding RS_Example to allow for quick function testing.

Follow-up - we will make something more interesting in the bands (perhaps add a generated tree canopy or use the values from a real (but tiny) raster. This will be helpful for making more user friendly examples.

Example run:

> Select RS_Width(rs_example());
┌────────────────────────┐
│ rs_width(rs_example()) │
│         uint64         │
╞════════════════════════╡
│                     64 │
└────────────────────────┘

@jesspav jesspav requested a review from Copilot November 14, 2025 17:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the RS_Example function to provide a quick testing utility for raster operations, and includes support for scalar raster inputs in the executor.

Key Changes:

  • Added RS_Example UDF that generates a sample 64x32 raster with 3 bands for testing purposes
  • Extended RasterExecutor to handle both array and scalar raster inputs
  • Registered the new raster function set in the Sedona context

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
rust/sedona/src/context.rs Registers the raster function set to make RS_Example available
rust/sedona/Cargo.toml Adds sedona-raster-functions dependency
rust/sedona-raster-functions/src/rs_example.rs Implements RS_Example UDF with sample raster generation logic
rust/sedona-raster-functions/src/register.rs Registers rs_example_udf in the default function set
rust/sedona-raster-functions/src/lib.rs Exports the rs_example module
rust/sedona-raster-functions/src/executor.rs Adds scalar raster support to RasterExecutor with handling for Struct and Null scalars

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jesspav jesspav changed the title Add RS_Example and support for raster scalars [WIP] Add RS_Example and support for raster scalars Nov 14, 2025
@jesspav jesspav marked this pull request as ready for review November 15, 2025 00:48
@jesspav jesspav requested a review from paleolimbot November 15, 2025 00:49
@jesspav jesspav changed the title [WIP] Add RS_Example and support for raster scalars Add RS_Example and support for raster scalars Nov 15, 2025
Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jiayuasu jiayuasu merged commit 53e70bd into apache:main Nov 15, 2025
12 checks passed
@jesspav jesspav mentioned this pull request Nov 15, 2025
@paleolimbot paleolimbot added this to the 0.2.0 milestone Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants