Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-4291

[metastore] Do not use smallints in the create table from file wizard

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.10.0
    • Fix Version/s: 3.11.0
    • Component/s: app.editor
    • Labels:
      None
    • Target Version:
    • Sprint:
      Jul 25 - Aug 12, 2016

      Description

      When you upload 201402_trip_data.csv from https://s3.amazonaws.com/babs-open-data/babs_open_data_year_1.zip, two columns are incorrectly set as smallint: tripid and duration should be ints.

      If you name the table, biketrips ...

      select max(tripid) from biketrips; -- 198775
      select max(duration) from biketrips; -- 722236
      

      This causes all values for tripid and duration > 32767 to be set as 32767.

      select count(*) from biketrips where tripid=32767;
      select count(*) from biketrips where duration=32767;
      
      /* Compare this query with & without the WHERE clause */
      SELECT bike, count(tripid) AS trips
      FROM biketrips
      --WHERE tripid!=32767
      GROUP BY  bike
      ORDER BY  trips DESC ;
      

        Attachments

          Activity

            People

            • Assignee:
              enricoberti Enrico Berti
              Reporter:
              gbarr Gwendolynne Barr
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: