You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "edgar2020 (via GitHub)" <gi...@apache.org> on 2024/08/09 00:21:42 UTC

[PR] [Docs] Batch08: adding examples to string functions (druid)

edgar2020 opened a new pull request, #16871:
URL: https://github.com/apache/druid/pull/16871

   ### Description
   
   Add examples to the sql-functions.md page
   
   Updates the `REPLACE`, `REPEAT`, `STRPOS`, `REVERSE`, `STRING_FORMAT`, `SUBSTRING`, `SUBSTR`, `TRIM`, `BTRIM`, `LTRIM` and `TRTIM` functions.
   
   This PR has:
   
   - [X] been self-reviewed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Batch08: adding examples to string functions (druid)

Posted by "edgar2020 (via GitHub)" <gi...@apache.org>.
edgar2020 commented on PR #16871:
URL: https://github.com/apache/druid/pull/16871#issuecomment-2291627346

   > @edgar2020 could you resolve conflicts?
   
   @FrankChen021 Merge conflicts resolved


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Batch08: adding examples to string functions (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on code in PR #16871:
URL: https://github.com/apache/druid/pull/16871#discussion_r1713115616


##########
docs/querying/sql-functions.md:
##########
@@ -1519,27 +1655,69 @@ Alias for [`LENGTH`](#length).
 
 ## STRPOS
 
-`STRPOS(<CHARACTER>, <CHARACTER>)`
+Returns the one-based index position of a substring within an expression.

Review Comment:
   what if the substring is not found in the given expression?



##########
docs/querying/sql-functions.md:
##########
@@ -1706,17 +1884,36 @@ Takes the difference between two timestamps, returning the results in the given
 **Function type:** [JSON](sql-json-functions.md)
 
 `TO_JSON_STRING(expr)`
-
+ƒ()

Review Comment:
   what is this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Batch08: adding examples to string functions (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 commented on PR #16871:
URL: https://github.com/apache/druid/pull/16871#issuecomment-2287718721

   @edgar2020 could you resolve conflicts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Batch08: adding examples to string functions (druid)

Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 merged PR #16871:
URL: https://github.com/apache/druid/pull/16871


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Batch08: adding examples to string functions (druid)

Posted by "edgar2020 (via GitHub)" <gi...@apache.org>.
edgar2020 commented on code in PR #16871:
URL: https://github.com/apache/druid/pull/16871#discussion_r1715602049


##########
docs/querying/sql-functions.md:
##########
@@ -1706,17 +1884,36 @@ Takes the difference between two timestamps, returning the results in the given
 **Function type:** [JSON](sql-json-functions.md)
 
 `TO_JSON_STRING(expr)`
-
+ƒ()

Review Comment:
   thank you for catching this!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Batch08: adding examples to string functions (druid)

Posted by "edgar2020 (via GitHub)" <gi...@apache.org>.
edgar2020 commented on code in PR #16871:
URL: https://github.com/apache/druid/pull/16871#discussion_r1715601331


##########
docs/querying/sql-functions.md:
##########
@@ -1519,27 +1655,69 @@ Alias for [`LENGTH`](#length).
 
 ## STRPOS
 
-`STRPOS(<CHARACTER>, <CHARACTER>)`
+Returns the one-based index position of a substring within an expression.

Review Comment:
   Adding the sentence: "If `substring` is not found, returns 0."



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org