Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20746 Built-in SQL Function Improvement
  3. SPARK-20754

Add Function Alias For MOD/TRUNCT/POSITION

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: SQL
    • Labels:

      Description

      We already have the impl of the following functions. We can add the function alias to be consistent with ANSI.

       
      MOD(<m>,<n>)
      

      Returns the remainder of m divided by n. Returns m if n is 0.

       
      TRUNC
      

      Returns the number x, truncated to D decimals. If D is 0, the result will have no decimal point or fractional part. If D is negative, the number is zeroed out.

       
      POSITION
      

      Returns the position of the char IN <string>) in the source string.

        Attachments

          Activity

            People

            • Assignee:
              yumwang Yuming Wang
              Reporter:
              smilegator Xiao Li
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: