[ 
https://issues.apache.org/jira/browse/HIVE-11255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14627074#comment-14627074
 ] 

Sergey Shelukhin commented on HIVE-11255:
-----------------------------------------

See this code:
{noformat}

    // Get full objects. For Oracle, do it in batches.
    List<Partition> result = null;
    if (batchSize != NO_BATCHING && batchSize < sqlResult.size()) {
      result = new ArrayList<Partition>(sqlResult.size());
      while (result.size() < sqlResult.size()) {
        int toIndex = Math.min(result.size() + batchSize, sqlResult.size());
        List<Object> batchedSqlResult = sqlResult.subList(result.size(), 
toIndex);
        result.addAll(getPartitionsFromPartitionIds(dbName, tblName, isView, 
batchedSqlResult));
      }
    } else {
      result = getPartitionsFromPartitionIds(dbName, tblName, isView, 
sqlResult);
    }
{noformat}

> get_table_objects_by_name() in HiveMetaStore.java needs to retrieve table 
> objects in multiple batches 
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-11255
>                 URL: https://issues.apache.org/jira/browse/HIVE-11255
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema
>    Affects Versions: 2.0.0
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>         Attachments: HIVE-11255.patch
>
>
> get_table_objects_by_name() function in HiveMetaStore.java right now will 
> pass all the tables of one database to ObjectStore to retrieve the table 
> objects, which will cause {{java.sql.SQLSyntaxErrorException: ORA-01795: 
> maximum number of expressions in a list is 1000}} in Oracle database. We 
> should break the table list into multiple sublists similar as the drop 
> database op.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to