Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1141

ISNUMERIC should be implemented as a SQL function

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.1.0-m1
    • 0.7.0
    • Functions - Drill
    • None
    • every environment

    Description

      Hi,

      would be great to have a ISNUMERIC function in SQL because if you want to run a count on self-described data there should be an option to check wether the field is numeric and therefore countable.

      if you have a CSV for example and the first line or some other lines (such as in a pagebreak when importing) include the fieldnames and therefore text-characters.

      Would be great if a query such as: SELECT count(columns[0]) as number FROM dfs.`bla` WHERE ISNUMERIC(columns[0])=1

      Thanks

      Attachments

        1. DRILL-1141-v2.patch
          10 kB
          Yash Sharma
        2. DRILL-1141-rebased.patch
          9 kB
          Yash Sharma

        Activity

          People

            mehant Mehant Baid
            fabian_wilckens Fabian Wilckens
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: