Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5685

Support MySQL CONVERT function that works on data types

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Minor
    • Resolution: Unresolved
    • 1.34.0
    • None
    • core

    Description

      CONVERT function in MySQL has two usage:

      1. convert(s USING transcodingName): as described in CALCITE-5664
      2. convert(value, type): equivalent to CAST function that converts value to specific type.

      Here are some examples:

      • convert(150, CHAR)
      • convert(now(), DATE)
      • convert('9.5', DECIMAL(10, 2))
      • convert(15, SIGNED)
      • convert(-2, UNSIGNED)

      Noted: for CONVERT or CAST function in MySQL, they only support converting to some specific data types(binary、char、date、time、datetime、decimal、signed、unsigned. Moreover, the last two aren't JDBC sql Types).

       

      Attachments

        Issue Links

          Activity

            People

              VAE ZheHu
              VAE ZheHu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: