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

Hive functions should update writerIndex accordingly when return binary type

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      unhex is a Hive function. the returned binary buffer could not be consumed by convert_from as shown below.

      0: jdbc:drill:zk=10.10.88.128:5181> select convert_from(unhex('0a5f710b'),'int_be') from (values(1));
      Error: SYSTEM ERROR: IndexOutOfBoundsException: readerIndex(0) + length(4) exceeds writerIndex(0): DrillBuf[31], udle: [25 0..1024]
      Fragment 0:0
      [Error Id: 5e72ce4a-6164-4260-8317-ca2bb6325013 on atsqa4-128.qa.lab:31010] (state=,code=0)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cshi Chunhui Shi
            cshi Chunhui Shi
            Karthikeyan Manivannan Karthikeyan Manivannan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment