You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ch...@apache.org on 2013/07/26 03:20:08 UTC

svn commit: r1507174 - in /pig/trunk: CHANGES.txt src/docs/src/documentation/content/xdocs/func.xml

Author: cheolsoo
Date: Fri Jul 26 01:20:07 2013
New Revision: 1507174

URL: http://svn.apache.org/r1507174
Log:
PIG-3392: Document STARTSWITH and ENDSWITH UDFs (sriramkrishnan via cheolsoo)

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/src/docs/src/documentation/content/xdocs/func.xml

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1507174&r1=1507173&r2=1507174&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Fri Jul 26 01:20:07 2013
@@ -204,6 +204,8 @@ PIG-3013: BinInterSedes improve chararra
 
 BUG FIXES
 
+PIG-3392: Document STARTSWITH and ENDSWITH UDFs (sriramkrishnan via cheolsoo)
+
 PIG-3393: STARTSWITH udf doesn't override outputSchema method (sriramkrishnan via cheolsoo)
 
 PIG-3389: "Set job.name" does not work with dump command (cheolsoo)

Modified: pig/trunk/src/docs/src/documentation/content/xdocs/func.xml
URL: http://svn.apache.org/viewvc/pig/trunk/src/docs/src/documentation/content/xdocs/func.xml?rev=1507174&r1=1507173&r2=1507174&view=diff
==============================================================================
--- pig/trunk/src/docs/src/documentation/content/xdocs/func.xml (original)
+++ pig/trunk/src/docs/src/documentation/content/xdocs/func.xml Fri Jul 26 01:20:07 2013
@@ -3154,6 +3154,55 @@ Use the TANH function to return the hype
 </ul>
  
    <!-- ++++++++++++++++++++++++++++++++++++++++++++++ -->
+<section id="endswith">
+   <title>ENDSWITH</title>
+   <p>Tests inputs to determine if the first argument ends with the string in the second. </p>
+
+<section>
+   <title>Syntax</title>
+   <table>
+       <tr>
+            <td>
+               <p>ENDSWITH(string, testAgainst)</p>
+            </td>
+         </tr> 
+        
+   </table></section>
+   
+<section>
+   <title>Terms</title>
+   <table>
+       <tr>
+            <td>
+               <p>string</p>
+            </td>
+            <td>
+               <p>The string to be tested.</p>
+            </td>
+         </tr> 
+         <tr>
+            <td>
+               <p>testAgainst</p>
+            </td>
+            <td>
+               <p>The string to test against.</p>
+            </td>
+         </tr> 
+   </table>
+</section>
+
+<section>
+     <title>Usage</title>
+     <p>
+Use the ENDSWITH function to determine if the first argument ends with the string in the second.
+     </p>
+     <p>
+For example, ENDSWITH ('foobar', 'foo') will false, whereas ENDSWITH ('foobar', 'bar') will return true.
+     </p>
+</section>
+</section> 
+
+<!-- ======================================================== -->  
  <section id="indexof">
    <title>INDEXOF</title>
    <p>Returns the index of the first occurrence of a character in a string, searching forward from a start index. </p>
@@ -3610,6 +3659,55 @@ Use the RTRIM function to remove trailin
 </section> 
 
 <!-- ======================================================== -->  
+<section id="startswith">
+   <title>STARTSWITH</title>
+   <p>Tests inputs to determine if the first argument starts with the string in the second. </p>
+
+<section>
+   <title>Syntax</title>
+   <table>
+       <tr>
+            <td>
+               <p>STARTSWITH(string, testAgainst)</p>
+            </td>
+         </tr> 
+        
+   </table></section>
+   
+<section>
+   <title>Terms</title>
+   <table>
+       <tr>
+            <td>
+               <p>string</p>
+            </td>
+            <td>
+               <p>The string to be tested.</p>
+            </td>
+         </tr> 
+         <tr>
+            <td>
+               <p>testAgainst</p>
+            </td>
+            <td>
+               <p>The string to test against.</p>
+            </td>
+         </tr> 
+   </table>
+</section>
+
+<section>
+     <title>Usage</title>
+     <p>
+Use the STARTSWITH function to determine if the first argument starts with the string in the second.
+     </p>
+     <p>
+For example, STARTSWITH ('foobar', 'foo') will true, whereas STARTSWITH ('foobar', 'bar') will return false.
+     </p>
+</section>
+</section> 
+
+<!-- ======================================================== -->  
  <section id="strsplit">
    <title>STRSPLIT</title>
    <p>Splits a string around matches of a given regular expression. </p>