Skip to content

Conversation

@magar51
Copy link

@magar51 magar51 commented Apr 10, 2024

No description provided.

@danieldeleo danieldeleo requested a review from rajc242 October 1, 2024 04:28
Copy link
Collaborator

@rajc242 rajc242 left a comment

Choose a reason for hiding this comment

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

Please check out comment. Please can we give some more meaningful description. Simple message with implementation won't be much helpful to users.

CREATE OR REPLACE FUNCTION ${self()}(haystack STRING, needle STRING) RETURNS INT64 AS (
CREATE OR REPLACE FUNCTION ${self()}(haystack STRING, needle STRING) RETURNS INT64
OPTIONS (
description="""Implements regexp_instr/2 (haystack, needle)."""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that possible to provide a little bit meaningful description so anyone can identify basic use case ?

This function aims to find the starting position of the first occurrence of a "needle" string within a "haystack" string.


CREATE OR REPLACE FUNCTION ${self()}(haystack STRING, needle STRING, start INT64) RETURNS INT64 AS (
CREATE OR REPLACE FUNCTION ${self()}(haystack STRING, needle STRING, start INT64) RETURNS INT64
OPTIONS (
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function is an extension of **cw_regexp_instr_2.sqlx** adding a start parameter to specify the starting position for searching the needle within the haystack

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.

2 participants