Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5607

Hive fails to parse the "%" (mod) sign after brackets.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.10.0
    • 0.14.0
    • Query Processor
    • Hide
      From 0.10.0 to 0.13.0, the following syntax for order by is allowed (though the doc doesn't specify):

      select * from table order by (expr1, exp2);

      From 0.14, the above syntax is illegal. Instead, the following should be used:

      select * from table order by expr1, exp2;
      Show
      From 0.10.0 to 0.13.0, the following syntax for order by is allowed (though the doc doesn't specify): select * from table order by (expr1, exp2); From 0.14, the above syntax is illegal. Instead, the following should be used: select * from table order by expr1, exp2;

    Description

      the scenario :
      create table t(a int);
      select * from t order by (a)%7;

      will fail with the following exception :
      FAILED: ParseException line 1:28 mismatched input '%' expecting EOF near ')'

      I must mention that this does work in 0.7.1 and doesn't work in 0.10

      Attachments

        1. HIVE-5607.patch
          0.8 kB
          Xuefu Zhang
        2. HIVE-5607.1.patch
          2 kB
          Xuefu Zhang

        Issue Links

          Activity

            People

              xuefuz Xuefu Zhang
              dimamah dima machlin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: