hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Mollitor (Jira)" <>
Subject [jira] [Commented] (HIVE-23266) Remove QueryWrapper from ObjectStore
Date Tue, 12 May 2020 14:36:00 GMT


David Mollitor commented on HIVE-23266:

[~ashutoshc] Are you able to take a look at this one?


I'm trying to get ObjectStore to be more in line with the DataNucleaus docs (which includes
no such facility, and {{Query}} class is {{Autocloseable}} now):

Transaction tx = pm.currentTransaction();

    Query q = pm.newQuery("SELECT FROM " + Product.class.getName() + " WHERE price < 150.00
ORDER BY price ASC");
    List<Product> products = q.executeList();
    Iterator<Product> iter = products.iterator();
    while (iter.hasNext())
        Product p =;

        ... (use the retrieved objects)

    if (tx.isActive())




> Remove QueryWrapper from ObjectStore
> ------------------------------------
>                 Key: HIVE-23266
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Major
>         Attachments: HIVE-23266.1.patch, HIVE-23266.10.patch, HIVE-23266.11.patch, HIVE-23266.2.patch,
HIVE-23266.2.patch, HIVE-23266.3.patch, HIVE-23266.4.patch, HIVE-23266.5.patch, HIVE-23266.6.patch,
HIVE-23266.7.patch, HIVE-23266.8.patch, HIVE-23266.9.patch
> There is currently a utility called {{QueryWrapper}} that makes a normal {{Query}} auto-closable.
 However, {{Query}} is now in fact already auto-closing, so there is no need for this class.
 In trying to remove it, I realized that this wrapper was being passed around in pretty convoluted
ways and also it was sometimes being created in a {{try-with-resources}} block but then never
actually used in any way.
> Remove the {{QueryWrapper}} from the class and simplify some of the DB interactions.

This message was sent by Atlassian Jira

View raw message