Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-358

Later versions of Oracle do not guarantee ordering of query's output rows unless "ORDER BY" was specified

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: CDH3u1, CDH3u2
    • Fix Version/s: None
    • Component/s: Sqoop
    • Labels:
    • Environment:
      Oracle Linux, CDH3u1

      Description

      File "sqoop/src/java/org/apache/sqoop/manager/OracleManager.java"
      Line #93 contains the following definition:

      public static final String QUERY_COLUMNS_FOR_TABLE =
      "SELECT COLUMN_NAME FROM ALL_TAB_COLUMNS WHERE "
      + "OWNER = ? AND TABLE_NAME = ?";

      This query is used to retrieve a set of columns for performing of data
      export to an Oracle database. Unfortunately, result of this query is
      unpredictable as the database does not guarantee ordering of query's
      output rows unless "ORDER BY" was specified. With older versions of
      Oracle DB (I remember seeing somewhere that Sqoop was tested with
      Oracle 9g) it was magically working, but with the latest 12g dev it
      does not. The query returns columns in inverse order and Sqoop
      generates bogus java code which crashes and burns trying to insert
      data into the database .

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dbrown26 Don Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: