You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/03/23 04:41:00 UTC

[jira] [Resolved] (CALCITE-5585) Add STRPOS() Function (Enabled for BigQuery)

     [ https://issues.apache.org/jira/browse/CALCITE-5585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-5585.
----------------------------------
    Fix Version/s: 1.35.0
       Resolution: Fixed

Fixed in [93b11cb1|https://github.com/apache/calcite/commit/93b11cb1dcd93bd09da66555b1d6ae423e7f8b21]; thanks for the PR, [~tanclary]!

> Add STRPOS() Function (Enabled for BigQuery)
> --------------------------------------------
>
>                 Key: CALCITE-5585
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5585
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Tanner Clary
>            Assignee: Tanner Clary
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.35.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> BigQuery supports the {{STRPOS()}} function with accepts 2 {{character strings}} as arguments. The function returns the 1-based position of the first occurrence of the second string within the first (example below). If no occurrence is found, the function returns 0. The function also supports {{binary strings}} with the same behavior. Note that {{STRPOS}} differs from the standard {{POSITION}} function in that it counts the position of the character in a {{binary string}}, not the position of a byte.
> EXAMPLE: {{STRPOS("abc", "bc")}} would return: {{2}}.
> EXAMPLE: {{STRPOS("abc", "d")}} would return: {{0}}.
> [BigQuery docs|https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#strpos]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)