This is an automated email from the ASF dual-hosted git repository.

jhyde pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git

commit 359135bfdf0a81b5ed4a7eefa2e1c5900ba213cd
Author: Greg Hart <greg.h...@protegrity.com>
AuthorDate: Mon Dec 19 11:08:23 2022 -0800

    [CALCITE-5443] After Statement.getMoreResults() has returned false, 
Statement.getUpdateCount() should return -1
    
    Close apache/calcite-avatica#201
---
 NOTICE                                             |  2 +-
 README                                             |  2 +-
 .../apache/calcite/avatica/AvaticaStatement.java   |  1 +
 .../calcite/avatica/AvaticaStatementTest.java      | 28 ++++++-
 site/_docs/docker_images.md                        | 28 +++----
 site/_docs/history.md                              | 98 ++++++++++++++++++++++
 site/_docs/howto.md                                |  4 +-
 7 files changed, 143 insertions(+), 20 deletions(-)

diff --git a/NOTICE b/NOTICE
index 83f395319..9dcc6fbf7 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Calcite -- Avatica
-Copyright 2012-2022 The Apache Software Foundation
+Copyright 2012-2023 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/README b/README
index 73c9dce8d..7a4eaaeaf 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Apache Calcite Avatica release 1.22.0
+Apache Calcite Avatica release 1.23.0
 
 # Overview
 This is a source or binary distribution of Avatica, a framework for
diff --git 
a/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java 
b/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java
index 1eff01bad..01fac3109 100644
--- a/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java
+++ b/core/src/main/java/org/apache/calcite/avatica/AvaticaStatement.java
@@ -476,6 +476,7 @@ public abstract class AvaticaStatement
     if (openResultSet != null) {
       openResultSet.close();
     }
+    updateCount = -1;
     return false;
   }
 
diff --git 
a/core/src/test/java/org/apache/calcite/avatica/AvaticaStatementTest.java 
b/core/src/test/java/org/apache/calcite/avatica/AvaticaStatementTest.java
index 26ea2ea28..985f91395 100644
--- a/core/src/test/java/org/apache/calcite/avatica/AvaticaStatementTest.java
+++ b/core/src/test/java/org/apache/calcite/avatica/AvaticaStatementTest.java
@@ -54,25 +54,49 @@ public class AvaticaStatementTest {
     assertArrayEquals(longValues, statement.executeLargeBatch());
   }
 
-  @Test public void testGetMoreResults() throws SQLException {
+  /** Test case for
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-2140>[CALCITE-2140]
+   * Basic implementation of Statement#getMoreResults()</a> that verifies 
result
+   * sets are closed after a call to {@code getMoreResults()}. */
+  @Test public void testGetMoreResultsWithResultSet() throws SQLException {
     AvaticaResultSet resultSet = mock(AvaticaResultSet.class);
     statement.openResultSet = resultSet;
 
     doCallRealMethod().when(statement).onResultSetClose(any(ResultSet.class));
     when(statement.getMoreResults()).thenCallRealMethod();
     when(statement.getMoreResults(anyInt())).thenCallRealMethod();
+    when(statement.getUpdateCount()).thenCallRealMethod();
 
     assertFalse(statement.getMoreResults());
+    assertEquals(-1, statement.getUpdateCount());
     verify(resultSet).close();
   }
 
+  /** Test case for
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-5443>[CALCITE-5443]
+   * After Statement.getMoreResults() has returned false,
+   * Statement.getUpdateCount() should return -1</a> that verifies that the
+   * update count is reset after a call to
+   * {@link java.sql.Statement#getMoreResults()}. */
+  @Test public void testGetMoreResultsWithUpdateCount() throws SQLException {
+    statement.updateCount = 1;
+
+    when(statement.getMoreResults()).thenCallRealMethod();
+    when(statement.getMoreResults(anyInt())).thenCallRealMethod();
+    when(statement.getUpdateCount()).thenCallRealMethod();
+    when(statement.getLargeUpdateCount()).thenCallRealMethod();
+
+    assertFalse(statement.getMoreResults());
+    assertEquals(-1, statement.getUpdateCount());
+    assertEquals(-1, statement.getLargeUpdateCount());
+  }
+
   @Test public void testFetchSize() throws SQLException {
     doCallRealMethod().when(statement).setFetchSize(anyInt());
     when(statement.getFetchSize()).thenCallRealMethod();
     statement.setFetchSize(50);
     assertEquals(50, statement.getFetchSize());
   }
-
 }
 
 // End AvaticaStatementTest.java
diff --git a/site/_docs/docker_images.md b/site/_docs/docker_images.md
index 41a7d77a9..2354ca3cb 100644
--- a/site/_docs/docker_images.md
+++ b/site/_docs/docker_images.md
@@ -70,22 +70,22 @@ file will start an instance of PostgreSQL and an instance 
of the Avatica server,
 exposing an Avatica server configured against a "real" PostgreSQL database.
 
 All of the `Dockerfile` and `docker-compose.yml` files are conveniently 
provided in an archive for
-each release. Here is the layout for release 1.22.0:
+each release. Here is the layout for release 1.23.0:
 
 ```
-avatica-docker-1.22.0/
-avatica-docker-1.22.0/hypersql/
-avatica-docker-1.22.0/mysql/
-avatica-docker-1.22.0/postgresql/
-avatica-docker-1.22.0/Dockerfile
-avatica-docker-1.22.0/hypersql/build.sh
-avatica-docker-1.22.0/hypersql/Dockerfile
-avatica-docker-1.22.0/mysql/build.sh
-avatica-docker-1.22.0/mysql/docker-compose.yml
-avatica-docker-1.22.0/mysql/Dockerfile
-avatica-docker-1.22.0/postgresql/build.sh
-avatica-docker-1.22.0/postgresql/docker-compose.yml
-avatica-docker-1.22.0/postgresql/Dockerfile
+avatica-docker-1.23.0/
+avatica-docker-1.23.0/hypersql/
+avatica-docker-1.23.0/mysql/
+avatica-docker-1.23.0/postgresql/
+avatica-docker-1.23.0/Dockerfile
+avatica-docker-1.23.0/hypersql/build.sh
+avatica-docker-1.23.0/hypersql/Dockerfile
+avatica-docker-1.23.0/mysql/build.sh
+avatica-docker-1.23.0/mysql/docker-compose.yml
+avatica-docker-1.23.0/mysql/Dockerfile
+avatica-docker-1.23.0/postgresql/build.sh
+avatica-docker-1.23.0/postgresql/docker-compose.yml
+avatica-docker-1.23.0/postgresql/Dockerfile
 ```
 
 #### Running
diff --git a/site/_docs/history.md b/site/_docs/history.md
index a4998524c..57b5203ef 100644
--- a/site/_docs/history.md
+++ b/site/_docs/history.md
@@ -28,6 +28,104 @@ For a full list of releases, see
 Downloads are available on the
 [downloads page]({{ site.baseurl }}/downloads/avatica.html).
 
+## <a 
href="https://github.com/apache/calcite-avatica/releases/tag/rel/avatica-1.23.0";>1.23.0</a>
 / 2023-01-19
+{: #v1-23-0}
+
+Apache Calcite Avatica 1.23.0 is ...
+
+Compatibility: This release is tested
+on Linux, macOS, Microsoft Windows;
+using Oracle JDK 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18;
+using IBM Java 8;
+Guava versions 14.0.1 to 31.1-jre;
+other software versions as specified in `gradle.properties`.
+
+Contributors to this release:
+Aleksey Stavrov,
+Francis Chuang,
+Greg Hart,
+Hongbin Ma,
+Istvan Toth,
+Jiajun Bernoulli,
+Julian Hyde (Release Manager),
+Kevin Minder,
+Oliver Lee,
+Richard Antal,
+Sergey Nuyanzin,
+Stamatis Zampetakis,
+Zhe Hu,
+zoudan
+
+Features and bug fixes
+
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5443";>CALCITE-5443</a>]
+  After `Statement.getMoreResults()` has returned false,
+  `Statement.getUpdateCount()` should return -1
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-3557";>CALCITE-3557</a>]
+  `ResultSet.getObject` throws `ClassCastException` when applied to an `ARRAY`
+  or `MULTISET` value inside a `MULTISET`
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5120";>CALCITE-5120</a>]
+  `UnregisteredDriver.connect` should throw `SQLException`, not
+  `NullPointerException`, if URL is null
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-2989";>CALCITE-2989</a>]
+  Use ISO calendar when converting between `java.sql` types and UNIX timestamps
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-2322";>CALCITE-2322</a>]
+  Support fetch size in connection url and JDBC statement
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5415";>CALCITE-5415</a>]
+  In `ByteString`, add `startsWith` and `endsWith` methods
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5374";>CALCITE-5374</a>]
+  Upgrade jackson from 2.10.0 to 2.14.1
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5379";>CALCITE-5379</a>]
+  Upgrade protobuf to 3.21.9
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5373";>CALCITE-5373</a>]
+  Upgrade bouncycastle to 1.70
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5369";>CALCITE-5369</a>]
+  In Avatica `DateTimeUtils`, add support for `FLOOR` and `CEIL` to `ISOYEAR`
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5358";>CALCITE-5358</a>]
+  Add in `HTTP_BAD_REQUEST`
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5372";>CALCITE-5372</a>]
+  Upgrade vlsi-release-plugins to 1.84
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5329";>CALCITE-5329</a>]
+  Upgrade Checkstyle version from 6.18 to 10.3.2
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5327";>CALCITE-5327</a>]
+  Make SSL key-store type configurable
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5295";>CALCITE-5295</a>]
+  Read the values of plugins (such as connect string properties) from
+  `ThreadLocal` fields
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-3078";>CALCITE-3078</a>]
+  Move public `lastDay` method from Calcite to Avatica
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5257";>CALCITE-5257</a>]
+  `NVARCHAR` is treated as 'UNKNOWN TYPE' when searching Oracle
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-4900";>CALCITE-4900</a>]
+  `NullPointerException` when send ExecuteRequest via protobuf with no
+  parameters
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5338";>CALCITE-5338</a>]
+  In `DateTimeUtils`, deprecate `floorMod` and `floorDiv`, and use equivalents
+  in `java.lang.Math`
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-1639";>CALCITE-1639</a>]
+  `TIMESTAMPADD(MONTH, ...)` should return last day of month if the day
+  overflows
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5232";>CALCITE-5232</a>]
+  Upgrade protobuf-java from 3.17.1 to 3.21.5
+
+Build and tests
+
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5458";>CALCITE-5458</a>]
+  Label and link pull requests with JIRA issues automatically
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5453";>CALCITE-5453</a>]
+  Add tests for fetch size configuration via connection URL and statement
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5344";>CALCITE-5344</a>]
+  Migrate Travis CI configuration to Github Actions
+
+Web site and documentation
+
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5353";>CALCITE-5353</a>]
+  Document new procedure for requesting JIRA accounts and becoming a 
contributor
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5065";>CALCITE-5065</a>]
+  Update phoenixdb information on website
+* [<a 
href="https://issues.apache.org/jira/browse/CALCITE-5438";>CALCITE-5438</a>]
+  Document `transparent_reconnection` property
+
 ## <a 
href="https://github.com/apache/calcite-avatica/releases/tag/rel/avatica-1.22.0";>1.22.0</a>
 / 2022-07-28
 {: #v1-22-0}
 
diff --git a/site/_docs/howto.md b/site/_docs/howto.md
index a7d43594e..4af69b404 100644
--- a/site/_docs/howto.md
+++ b/site/_docs/howto.md
@@ -43,8 +43,8 @@ Unpack the source distribution `.tar.gz` file,
 then build using Gradle:
 
 {% highlight bash %}
-$ tar xvfz apache-calcite-avatica-1.22.0-src.tar.gz
-$ cd apache-calcite-avatica-1.22.0-src
+$ tar xvfz apache-calcite-avatica-1.23.0-src.tar.gz
+$ cd apache-calcite-avatica-1.23.0-src
 $ gradle build
 {% endhighlight %}
 

Reply via email to