Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-8376

Gracefully handle SQL exceptions in ResultSetRecordSet

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.15.0
    • Extensions
    • None

    Description

      There is code in ResultSetRecordSet to call the JDBC API method isAfterLast() when attempting to determine the element type for an array. It is called to avoid possible exceptions later when getArray() is called.

      However because isAfterLast() is a JDBC API method, it too may be unsupported by drivers (and at the time of this writing, it is unsupported by the Presto JDBC driver). This defeats the purpose of the defensive code and can cause its own issues.

      This code should be refactored to more gracefully handle "not supported" exceptions.

      Attachments

        Issue Links

          Activity

            People

              mattyb149 Matt Burgess
              mattyb149 Matt Burgess
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m