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

Metastore direct sql queries with IN/(NOT IN) should be split based on max parameters allowed by SQL DB

    XMLWordPrintableJSON

Details

    Description

      Function org.apache.hadoop.hive.metastore.txn.TxnUtils#buildQueryWithINClauseStrings can generate queries with huge number of parameters with very small value of DIRECT_SQL_MAX_ELEMENTS_IN_CLAUSE and DIRECT_SQL_MAX_QUERY_LENGTH while generating delete query for completed_compactions table

      Example:

      DIRECT_SQL_MAX_ELEMENTS_IN_CLAUSE = 100
      DIRECT_SQL_MAX_QUERY_LENGTH = 10 (10 KB)
      Number of parameters in a single query = 4759
      

      Attachments

        Issue Links

          Activity

            People

              gupta.nikhil0007 Nikhil Gupta
              gupta.nikhil0007 Nikhil Gupta
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 2h 40m
                  2h 40m