Apache Drill
  1. Apache Drill
  2. DRILL-1141

ISNUMERIC should be implemented as a SQL function

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 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

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

        Activity

        Hide
        Yash Sharma added a comment -
        Show
        Yash Sharma added a comment - Review Board: https://reviews.apache.org/r/24345/
        Hide
        Yash Sharma added a comment -

        Implemented review comments

        Show
        Yash Sharma added a comment - Implemented review comments
        Hide
        Mehant Baid added a comment -

        Yash Sharma Can you please rebase the patch on the latest master.

        Show
        Mehant Baid added a comment - Yash Sharma Can you please rebase the patch on the latest master.
        Hide
        Yash Sharma added a comment -

        Attached rebased patch

        Show
        Yash Sharma added a comment - Attached rebased patch
        Hide
        Mehant Baid added a comment -

        Thanks for rebasing, I will merge this.

        Show
        Mehant Baid added a comment - Thanks for rebasing, I will merge this.
        Hide
        Mehant Baid added a comment -

        Fixed in 0a28365a252491b70c9a39a0d49dd68114fdc8fa

        Show
        Mehant Baid added a comment - Fixed in 0a28365a252491b70c9a39a0d49dd68114fdc8fa

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development