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

LIKE function usage not same as found in 'describe function LIKE;'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Documentation
    • None

    Description

      LIKE function usage is not correctly shown inĀ 'describe function LIKE;'

      hive (default)> describe function LIKE;
      OK
      LIKE(str, pattern) - Checks if str matches pattern
      Time taken: 0.033 seconds, Fetched: 1 row(s)

      AS PER DESCRIPTION, USAGE DOESN'T WORK:
      hive (default)> select LIKE('Hope Jenny has solved the clustering problem by now', '%Jenny%');
      FAILED: ParseException line 1:11 cannot recognize input near 'LIKE' '(' ''Hope Jenny has solved the clustering problem by now'' in expression specifica
      tion

      CORRECT USAGE SHOULD BE:
      hive (default)> select 'Hope Jenny has solved the clustering problem by now' LIKE '%Jenny%';
      OK
      true
      Time taken: 0.476 seconds, Fetched: 1 row(s)

      PLEASE MODIFY THE DESCRIPTION/DOC AS PER BELOW:
      (str LIKE pattern) - Checks if str matches pattern
      Example:
      select LIKE('Hope Jenny has solved the clustering problem by now', '%Jenny%');

      Attachments

        Activity

          People

            Unassigned Unassigned
            adas_iitm Abhijit Das
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 12h
                12h
                Remaining:
                Remaining Estimate - 12h
                12h
                Logged:
                Time Spent - Not Specified
                Not Specified