Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2199

DIH JdbcDataSource - Support multiple resultsets

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 6.1, 7.0
    • Labels:
      None

      Description

      Database servers can return multiple result sets from a single statement. This can be beneficial for indexing because it reduces the number of connections and statements being executed against a database, therefore reducing overhead. The JDBC Statement object supports reading multiple ResultSets. Support should be added to the JdbcDataSource to take advantage of this.

      1. SOLR-2199.patch
        1 kB
        Mark Waddle
      2. SOLR-2199.patch
        8 kB
        Kristine Jetzke

        Activity

        Hide
        markwaddle Mark Waddle added a comment -

        Patch to support multiple result sets in JdbcDataSource

        Show
        markwaddle Mark Waddle added a comment - Patch to support multiple result sets in JdbcDataSource
        Hide
        lafeuil Thomas Champagne added a comment -

        I don't understand why this patch have not been applied. It is very small and uncomplicated. It's a good idea to read multiple resultset from a single statement.

        But in my case, i would like set SQL session parameters before executing the query.

        For example with a Postgresql example :

        SET join_collapse_limit=1;
        SELECT * FROM library.book b
        LEFT JOIN library.page p ON p.id_book=b.id_book;
        

        In this example, the first resultset is empty but with the patch, the second resultset would be read.

        Show
        lafeuil Thomas Champagne added a comment - I don't understand why this patch have not been applied. It is very small and uncomplicated. It's a good idea to read multiple resultset from a single statement. But in my case, i would like set SQL session parameters before executing the query. For example with a Postgresql example : SET join_collapse_limit=1; SELECT * FROM library.book b LEFT JOIN library.page p ON p.id_book=b.id_book; In this example, the first resultset is empty but with the patch, the second resultset would be read.
        Hide
        tinexw Kristine Jetzke added a comment - - edited

        Any chance of this patch being applied soon? If there is still work to do I'd be happy to make any required changes to it.

        Show
        tinexw Kristine Jetzke added a comment - - edited Any chance of this patch being applied soon? If there is still work to do I'd be happy to make any required changes to it.
        Hide
        mkhludnev Mikhail Khludnev added a comment -

        Kristine Jetzke, at least it lacks a unit test. I'd like to commit if it's provided.

        Show
        mkhludnev Mikhail Khludnev added a comment - Kristine Jetzke , at least it lacks a unit test. I'd like to commit if it's provided.
        Hide
        tinexw Kristine Jetzke added a comment -

        Mikhail Khludnev I attached a new patch that additionally handles some cases that were missing in the original patch (e.g. result set is initially returned, followed by an update count, followed by another result set or update count initially returned followed by a result set). I also added unit tests.

        Show
        tinexw Kristine Jetzke added a comment - Mikhail Khludnev I attached a new patch that additionally handles some cases that were missing in the original patch (e.g. result set is initially returned, followed by an update count, followed by another result set or update count initially returned followed by a result set). I also added unit tests.
        Hide
        mkhludnev Mikhail Khludnev added a comment -

        the patch seems fine. committing.

        Show
        mkhludnev Mikhail Khludnev added a comment - the patch seems fine. committing.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit fce10ae1097fa7f764516f2b343365e86afc273d in lucene-solr's branch refs/heads/master from Mikhail Khludnev
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fce10ae ]

        SOLR-2199: DataImportHandler (DIH) JdbcDataSource supports multiple resultsets per query

        Show
        jira-bot ASF subversion and git services added a comment - Commit fce10ae1097fa7f764516f2b343365e86afc273d in lucene-solr's branch refs/heads/master from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fce10ae ] SOLR-2199 : DataImportHandler (DIH) JdbcDataSource supports multiple resultsets per query
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit c67258694be9e0ce9a0631f64d14a7853e81dc9a in lucene-solr's branch refs/heads/branch_6x from Mikhail Khludnev
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c672586 ]

        SOLR-2199: DataImportHandler (DIH) JdbcDataSource supports multiple resultsets per query

        Show
        jira-bot ASF subversion and git services added a comment - Commit c67258694be9e0ce9a0631f64d14a7853e81dc9a in lucene-solr's branch refs/heads/branch_6x from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c672586 ] SOLR-2199 : DataImportHandler (DIH) JdbcDataSource supports multiple resultsets per query

          People

          • Assignee:
            mkhludnev Mikhail Khludnev
            Reporter:
            markwaddle Mark Waddle
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development