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

Casting to decimal on text files is not working

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=caa8b78

      USING DECIMAL :
      create view cast_dec as select cast(columns[0] as decimal(10,5)) from `temp.tbl`;

      select * from cast_dec;
      ------------

      EXPR$0

      ------------

      0
      0

      ------------

      USING DOUBLE :
      create view cast_dbl as select cast(columns[0] as double) from `temp.tbl`;

      select * from cast_dbl;
      ------------

      EXPR$0

      ------------

      0.01
      0.05

      ------------

      I attached the text file used.

      Attachments

        1. test.tbl
          0.0 kB
          Rahul Kumar Challapalli
        2. PhysicalPlan_View
          0.3 kB
          Rahul Kumar Challapalli
        3. PhysicalPlan_NoView
          0.2 kB
          Rahul Kumar Challapalli
        4. DRILL-1213.patch
          1 kB
          Mehant Baid

        Activity

          People

            DrillCommitter DrillCommitter
            rkins Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: