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

ISNUMERIC should be implemented as a SQL function

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.1.0-m1
    • Fix Version/s: 0.7.0
    • Component/s: Functions - Drill
    • Labels:
      None
    • Environment:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: