[calcite-avatica] branch stage updated (8f8377551 -> fab03540d)
This is an automated email from the ASF dual-hosted git repository. jhyde pushed a change to branch stage in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git from 8f8377551 [CALCITE-4933] Release Avatica 1.20.0 add d7e108530 Update website for Avatica 1.20.0 release add c6a819aa6 Silence standard out messages in tests add 35554749e [CALCITE-4940] Upgrade log4j2 version to 2.16.0 add 8a2048033 [CALCITE-4951] Upgrade log4j2 version to 2.17.0 add fe27e5046 Site: Change the javadoc title to Apache Calcite Avatica API add e9d14a684 [CALCITE-4962] Protobuf debug does not show request/response type add fbdcc6274 [CALCITE-4974] Upgrade log4j2 version to 2.17.1 add 387f87a10 [CALCITE-5070] Upgrade Jekyll and ruby gems for site generation add b9aa1fb97 [CALCITE-3129] Automate website builds add cb2cb810c [CALCITE-5075] Build fails due to rat check on Gemfile.lock add a7baa3b7a Add Apache license header to website publication Github workflows add 9ddb93762 [CALCITE-5009] Transparent JDBC connection re-creation may lead to data loss add 796523376 [CALCITE-4971] Update httpclient and httpcore to latest 5.1 release add f48dbc8c1 [CALCITE-5098] Migrate Avatica to Gradle 7.4.2, and support Java 16 and 17 add 3281f2bcf [CALCITE-5103] Update docker-compose.yml files to use OpenJDK 17 and Gradle 7.4.2 images add 909e92e24 [CALCITE-5102] Update github-pages gem for site build add 6de8d796b Comment out release notes for next release, so that they don't appear on the web site add 5fcd09f9b Add instructions for release managers to uncomment commented out release history add e255f022f Fix formatting in howto add 7e168f22d [CALCITE-5106] Upgrade to Jekyll 4 and remove unnecessary dependencies from gemfile for site add 7f9844cd4 [CALCITE-5108] Make website GDPR-compliant add 1f0f0c1c5 [CALCITE-4147] Rename "master" branch to "main" add 05658feaa [CALCITE-5116] Upgrade vlsi-release-plugins to 1.78 add 360c0e7c8 [CALCITE-5095] Support Java 18 and Guava 31.1-jre add 08832629f [CALCITE-5097] Release Avatica 1.21.0 add bad14c7d9 Update website for Avatica 1.21.0 release add aad227f38 Checkout release svn repository when promoting a release using the docker script add 0c097b6a6 [CALCITE-5218] Verify HTTP client class before instantiating it add 71fc0abf7 [CALCITE-5220] Release Avatica 1.22 add 354eaf120 Update website for Avatica 1.22 release add 2485639af [CALCITE-5232] Upgrade protobuf-java from 3.17.1 to 3.21.5 add a111295d6 Prepare for next development iteration add e47b43ee8 [CALCITE-1639] TIMESTAMPADD(MONTH, ...) should return last day of month if the day overflows add e2ba4a7c3 [CALCITE-5338] In DateTimeUtils, deprecate floorMod and floorDiv, and use equivalents in java.lang.Math add 74a736472 [CALCITE-4900] NullPointerException when send ExectuteRequest via protobuf with no parameters add af0e9e44c [CALCITE-5257] NVARCHAR is treated as 'UNKNOWN TYPE' when searching Oracle add 0ea5d4f40 [CALCITE-3078] Move public lastDay method from Calcite to Avatica add 644d8218e [CALCITE-5295] Read the values of plugins (such as connect string properties) from ThreadLocal fields add c17f489be [CALCITE-5344] Migrate Travis CI configuration to Github Actions add 9f4557c7f [CALCITE-5327] Make SSL key-store type configurable add 4cee17299 [CALCITE-5329] Upgrade Checkstyle version from 6.18 to 10.3.2 add d266bcb6e [CALCITE-5372] Upgrade vlsi-release-plugins to 1.84 add bc2857816 [CALCITE-5358] Add in HTTP_BAD_REQUEST add d9a2e105a [CALCITE-5369] In Avatica DateTimeUtils, add support for FLOOR and CEIL to ISOYEAR add 8d5eb143e [CALCITE-5353] Document new procedure for requesting JIRA accounts and becoming a contributor add 00c60533d [CALCITE-5373] Upgrade bouncycastle to 1.70 add 1eb58d95a [CALCITE-5379] Upgrade protobuf to 3.21.9 add 42f53ffe5 [CALCITE-5374] Upgrade jackson from 2.10.0 to 2.14.1 add dcc0ff324 [CALCITE-5415] In ByteString, add 'startsWith' and 'endsWith' methods add 5047b566d [CALCITE-2322] Support fetch size in connection url and JDBC statement add dbe9b1d8c [CALCITE-2989] Use ISO calendar when converting between java.sql types and UNIX timestamps add 2b6da3b21 [CALCITE-5438] Document transparent_reconnection property add 224e3dd56 [CALCITE-5065] Update phoenixdb information on website add e197a3537 [CALCITE-5453] Add tests for fetch size configuration via connection URL and statement add 20b917c35 [CALCITE-5458] Label and link pull requests with JIRA issues automatically add ac47eb619 [CALCITE-5120] UnregisteredDriver#connect should throw SQLException, not NullPointerException, if url is null add 810acf807 [CALCITE-3557] ResultSet.getObject throws ClassCastException when applied to an ARRAY or MULTIS
[calcite-avatica] annotated tag avatica-1.23.0-rc0 updated (fab03540d -> 7f197086f)
This is an automated email from the ASF dual-hosted git repository. jhyde pushed a change to annotated tag avatica-1.23.0-rc0 in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git *** WARNING: tag avatica-1.23.0-rc0 was modified! *** from fab03540d (commit) to 7f197086f (tag) tagging fab03540de866faa783194ed58beb4319f3066c7 (commit) replaces rel/avatica-1.22.0 by Julian Hyde on Sun Jan 15 18:40:19 2023 -0800 - Log - --- No new revisions were added by this update. Summary of changes:
svn commit: r59365 - in /dev/calcite/apache-calcite-avatica-1.23.0-rc0: apache-calcite-avatica-1.23.0-src.tar.gz apache-calcite-avatica-1.23.0-src.tar.gz.asc apache-calcite-avatica-1.23.0-src.tar.gz.s
Author: jhyde Date: Mon Jan 16 03:02:33 2023 New Revision: 59365 Log: Uploading release candidate Apache Calcite Avatica avatica-1.23.0-rc0 to dev area Modified: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.sha512 Modified: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz == (empty) Modified: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc == --- dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc (original) +++ dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc Mon Jan 16 03:02:33 2023 @@ -1,17 +1,17 @@ -BEGIN PGP SIGNATURE- Version: BCPG v1.68 -iQIzBAABCgAdFiEE3TFPXhdzfXalVNzo3bbpgSrT+uMFAmPEumwACgkQ3bbpgSrT -+uP3tRAAjiA/NhIYjzM4D3f26KGY7HxAI64k6UGFiWMPNrrf/OnRE8C1NhCXXY8P -fZk8sKBXmI3UTPpImqRz9QY7NAqwwlf7TL8praCqEQPLOmcmRCGaHTLtfT1Ou3CN -mttzm2sopyJHLS2UW9RMiGUDlh+65FaLcfXcmBzUT9VvN1WfjxaRZ3QMrI95kLKl -0xENHiIM5FtP42G55JDUInrKRPjFyqbVrsWMGnhmtBrPo2t5zq+jgqwSnR5Nzsk2 -bNqC50GGAj9OwLs2zqqp0oTHERWkOLYJ8WKUnf96VFFenE8UDPIDTmAejCXXPtHn -0LFRYWfLpNNS4j50AjbF1VwM+gG2TRPyEeVczu/2CSEeNWsfP+ORI7VkwWTYPJ/N -0UMRZ9xAX+EzzOYPKxcxudubEdMpbs8FJ4uG0M2hEaIozGE9xq0CpUFayJ2WNqGj -JAQ7HNpVLbyYd07igzHJiACMnoQ5tjS8V+uYV5n/tbtId9alBMCo6BRyWnuyOKCs -O39NWZzxMhmBcsRRAQrKEaZmZ/vRMSBpKE5K7sNMc9GhhHjOj7I+VbXt4NpwkJzo -fqtz/xCrs492SW1hy2gm3PU4aABjPFmX6uNEBRKJAcFLzszTBL9p+yFfFARnFdT1 -dvdqWa8hzvnmO6pWF89t1LI+hQ9KkwaUzTbrzHQznKnVxsqcAc0= -=AFJC +iQIzBAABCgAdFiEE3TFPXhdzfXalVNzo3bbpgSrT+uMFAmPEvjoACgkQ3bbpgSrT ++uP5Qg/+LOhn3acVhrEGtrVfaTJNWnf2DkRTsCiAoMDuRTz8GSg/wWt0Dh92iOsL +uwmUCx0fyf5rXAaAlL173hgZpwBwLmYSKP2rWS4IxUPbImtLoNSMjroQkj+6F5sP +qAF+zvYpS+kyO/QG2dGJQ/tgtKobUX0FXJPte0I2gOISn5HQI1U4EyN7uc4ic7jX +Qh8TAUh1TeuUMIJc1wyGgCoJmJffyCh+8b0tqXP3tXwRpCzwey1ho0GVF9uRPfw0 +HUcYHpLIyvxhq9noiCq0mwcR9wcdhpgzGgDLvQeayKwZGV4uA5lGgWevRbU6cnct +r+iEBZp17/R+41GiPqKMAlt/0xixbU4WOF+g064Os7jVp9ItlbCCzqqju7qYW5/K +qE+QA0vAn+o7B4E8gH8985F+Wy3rbXETwcbMckd/HbQ1P80kRocGoEg8P5wuIOCO +txMeCMF/YpROa9h3rzaNA8OU+JdO1I+glFL2lnj81AWT1FLGM9XNuStMiwIM2G/9 +mXbmX6d38q0PBWLMlaV+LbgRgHFfksB4yiLrpef9L50MoaR8QnBkPGUmRCggPuij +Og8eKuYosX/SkOKLG6auM8w9kwbgqL8r6a1hMPKpCkw96y9cJ8JNVQmpXe4UkKao +Wbi0wMwdbvr7oW0PGMFORFWcmx8wMVd+P+JeAzANu3A/cmrH/ps= +=EKSd -END PGP SIGNATURE- Modified: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.sha512 == (empty)
svn commit: r59364 - in /dev/calcite/apache-calcite-avatica-1.23.0-rc0: apache-calcite-avatica-1.23.0-src.tar.gz apache-calcite-avatica-1.23.0-src.tar.gz.asc apache-calcite-avatica-1.23.0-src.tar.gz.s
Author: jhyde Date: Mon Jan 16 02:46:08 2023 New Revision: 59364 Log: Uploading release candidate Apache Calcite Avatica avatica-1.23.0-rc0 to dev area Modified: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.sha512 Modified: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz == (empty) Modified: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc == --- dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc (original) +++ dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc Mon Jan 16 02:46:08 2023 @@ -1,17 +1,17 @@ -BEGIN PGP SIGNATURE- Version: BCPG v1.68 -iQIzBAABCgAdFiEE3TFPXhdzfXalVNzo3bbpgSrT+uMFAmPEuPMACgkQ3bbpgSrT -+uOlHxAAojJV+Ms8PggrwE0KKUJ1DVouWZEyaY2xvi1c/hZdh9Y4xO5+dWfrUXsC -sUfBzO0v4WAvEjvWBp1sEr+EknwNEoR4eO3KnZIMaUTaz+Ec9McW43jAFS2J+HF9 -5El1jk/w6GD9QwvAf8fwiRiY701sCLCkFgeukPK/SoQ5Y8O/S7V+EOpVIsUoNX3n -XQdNvC6dBTYhvXFh/IiFs4BTnPPTm5iEX5itJyVEYV2OhPHftg91LztmkrmzIhKW -y1U8GKeaMlblojb9QEvvpbE7ZyUdnb9qrMjyMvqFVoiMVohj1x8vhbA3D/7J00+S -Fqd7UbAoJQCOZOxIcvQ4dhtWvs4fwqbbLcyzgU/MKD8qiCSUOriT4+3g4TJuI0IQ -immnNFrJaPTGSvVSdPogFZJYtItX8x1F4z0rIAXwSCN7hTI+YyT0nMS4MgoA+8sI -gHh7SGSTRuYtiElgPaNhurPGDtl5+M5gxu1d2WIBo6LG58zGTcy2AsPkcFfDYyvD -MhcJCy7Go1sQZn0OrEYRvt5iwea1s3AGzsS8cQZr5AyxtJinljXgV4O8+0w+BdTo -TN72BzTIPWmJD64Ngi1ti9DJZpE6qmbEHJ7FW8dyWaoCkS4Zw/MOThbfhMWi4V1X -/iPqqpVh52ByrIrFV4r9kuu9lmtnicEB2U2tEWS6idCZsZrYNpo= -=R2kF +iQIzBAABCgAdFiEE3TFPXhdzfXalVNzo3bbpgSrT+uMFAmPEumwACgkQ3bbpgSrT ++uP3tRAAjiA/NhIYjzM4D3f26KGY7HxAI64k6UGFiWMPNrrf/OnRE8C1NhCXXY8P +fZk8sKBXmI3UTPpImqRz9QY7NAqwwlf7TL8praCqEQPLOmcmRCGaHTLtfT1Ou3CN +mttzm2sopyJHLS2UW9RMiGUDlh+65FaLcfXcmBzUT9VvN1WfjxaRZ3QMrI95kLKl +0xENHiIM5FtP42G55JDUInrKRPjFyqbVrsWMGnhmtBrPo2t5zq+jgqwSnR5Nzsk2 +bNqC50GGAj9OwLs2zqqp0oTHERWkOLYJ8WKUnf96VFFenE8UDPIDTmAejCXXPtHn +0LFRYWfLpNNS4j50AjbF1VwM+gG2TRPyEeVczu/2CSEeNWsfP+ORI7VkwWTYPJ/N +0UMRZ9xAX+EzzOYPKxcxudubEdMpbs8FJ4uG0M2hEaIozGE9xq0CpUFayJ2WNqGj +JAQ7HNpVLbyYd07igzHJiACMnoQ5tjS8V+uYV5n/tbtId9alBMCo6BRyWnuyOKCs +O39NWZzxMhmBcsRRAQrKEaZmZ/vRMSBpKE5K7sNMc9GhhHjOj7I+VbXt4NpwkJzo +fqtz/xCrs492SW1hy2gm3PU4aABjPFmX6uNEBRKJAcFLzszTBL9p+yFfFARnFdT1 +dvdqWa8hzvnmO6pWF89t1LI+hQ9KkwaUzTbrzHQznKnVxsqcAc0= +=AFJC -END PGP SIGNATURE- Modified: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.sha512 == (empty)
svn commit: r59363 - in /dev/calcite/apache-calcite-avatica-1.23.0-rc0: ./ apache-calcite-avatica-1.23.0-src.tar.gz apache-calcite-avatica-1.23.0-src.tar.gz.asc apache-calcite-avatica-1.23.0-src.tar.g
Author: jhyde Date: Mon Jan 16 02:39:59 2023 New Revision: 59363 Log: Uploading release candidate Apache Calcite Avatica avatica-1.23.0-rc0 to dev area Added: dev/calcite/apache-calcite-avatica-1.23.0-rc0/ dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.sha512 Added: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz == Binary files dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz (added) and dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz Mon Jan 16 02:39:59 2023 differ Added: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc == --- dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc (added) +++ dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.asc Mon Jan 16 02:39:59 2023 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- +Version: BCPG v1.68 + +iQIzBAABCgAdFiEE3TFPXhdzfXalVNzo3bbpgSrT+uMFAmPEuPMACgkQ3bbpgSrT ++uOlHxAAojJV+Ms8PggrwE0KKUJ1DVouWZEyaY2xvi1c/hZdh9Y4xO5+dWfrUXsC +sUfBzO0v4WAvEjvWBp1sEr+EknwNEoR4eO3KnZIMaUTaz+Ec9McW43jAFS2J+HF9 +5El1jk/w6GD9QwvAf8fwiRiY701sCLCkFgeukPK/SoQ5Y8O/S7V+EOpVIsUoNX3n +XQdNvC6dBTYhvXFh/IiFs4BTnPPTm5iEX5itJyVEYV2OhPHftg91LztmkrmzIhKW +y1U8GKeaMlblojb9QEvvpbE7ZyUdnb9qrMjyMvqFVoiMVohj1x8vhbA3D/7J00+S +Fqd7UbAoJQCOZOxIcvQ4dhtWvs4fwqbbLcyzgU/MKD8qiCSUOriT4+3g4TJuI0IQ +immnNFrJaPTGSvVSdPogFZJYtItX8x1F4z0rIAXwSCN7hTI+YyT0nMS4MgoA+8sI +gHh7SGSTRuYtiElgPaNhurPGDtl5+M5gxu1d2WIBo6LG58zGTcy2AsPkcFfDYyvD +MhcJCy7Go1sQZn0OrEYRvt5iwea1s3AGzsS8cQZr5AyxtJinljXgV4O8+0w+BdTo +TN72BzTIPWmJD64Ngi1ti9DJZpE6qmbEHJ7FW8dyWaoCkS4Zw/MOThbfhMWi4V1X +/iPqqpVh52ByrIrFV4r9kuu9lmtnicEB2U2tEWS6idCZsZrYNpo= +=R2kF +-END PGP SIGNATURE- Added: dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.sha512 == --- dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.sha512 (added) +++ dev/calcite/apache-calcite-avatica-1.23.0-rc0/apache-calcite-avatica-1.23.0-src.tar.gz.sha512 Mon Jan 16 02:39:59 2023 @@ -0,0 +1 @@ +c369d5010d7c62b2be7037d28e35ed1681181c521fa8d7f92a5d3c0e93887a96077b3bf26435806533c701d97e9fbf17e1488d846e9dffcc9a10a3a1fc3f2220 *apache-calcite-avatica-1.23.0-src.tar.gz
[GitHub] [calcite] zoudan commented on a diff in pull request #2981: [CALCITE-5283] Add ARG_MIN, ARG_MAX aggregate functions
zoudan commented on code in PR #2981: URL: https://github.com/apache/calcite/pull/2981#discussion_r1070765927 ## core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java: ## @@ -1849,6 +1849,17 @@ public static > T greatest(T b0, T b1) { return b0 == null || b1 != null && b0.compareTo(b1) < 0 ? b1 : b0; } + /** Less than. */ + public static > boolean lessThan(T b0, T b1) { +return b1 == null || b0 != null && b0.compareTo(b1) < 0; + } + + /** Grater than. */ + public static > boolean greaterThan(T b0, T b1) { +return b1 == null || b0 != null && b0.compareTo(b1) > 0; Review Comment: `greaterThan` return wether b0 is greater than b1 while `greatest` return the larger one between b0 and b1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[calcite-avatica] 01/01: [CALCITE-5443] After Statement.getMoreResults() has returned false, Statement.getUpdateCount() should return -1
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 02c5fa1530586076fef3a15cffd31ea0e61ba98a Author: Greg Hart 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 --- .../apache/calcite/avatica/AvaticaStatement.java | 1 + .../calcite/avatica/AvaticaStatementTest.java | 28 -- 2 files changed, 27 insertions(+), 2 deletions(-) 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 + * https://issues.apache.org/jira/browse/CALCITE-2140>[CALCITE-2140] + * Basic implementation of Statement#getMoreResults() 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 + * https://issues.apache.org/jira/browse/CALCITE-5443>[CALCITE-5443] + * After Statement.getMoreResults() has returned false, + * Statement.getUpdateCount() should return -1 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
[calcite-avatica] branch main updated (359135bfd -> 02c5fa153)
This is an automated email from the ASF dual-hosted git repository. jhyde pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git discard 359135bfd [CALCITE-5443] After Statement.getMoreResults() has returned false, Statement.getUpdateCount() should return -1 new 02c5fa153 [CALCITE-5443] After Statement.getMoreResults() has returned false, Statement.getUpdateCount() should return -1 This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (359135bfd) \ N -- N -- N refs/heads/main (02c5fa153) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: NOTICE | 2 +- README | 2 +- site/_docs/docker_images.md | 28 ++--- site/_docs/history.md | 98 - site/_docs/howto.md | 4 +- 5 files changed, 18 insertions(+), 116 deletions(-)
[calcite-site] branch main updated: Website deployed from calcite-avatica@359135bfdf0a81b5ed4a7eefa2e1c5900ba213cd
This is an automated email from the ASF dual-hosted git repository. asf-ci-deploy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite-site.git The following commit(s) were added to refs/heads/main by this push: new 1ffa350e Website deployed from calcite-avatica@359135bfdf0a81b5ed4a7eefa2e1c5900ba213cd 1ffa350e is described below commit 1ffa350e923eedacc2da13bf66686b537819bda8 Author: julianhyde AuthorDate: Sun Jan 15 21:44:36 2023 + Website deployed from calcite-avatica@359135bfdf0a81b5ed4a7eefa2e1c5900ba213cd --- avatica/develop/avatica-go.html| 2 +- avatica/develop/avatica.html | 2 +- avatica/develop/index.html | 2 +- avatica/docs/client_reference.html | 2 +- avatica/docs/compatibility.html| 2 +- avatica/docs/custom_client_artifacts.html | 2 +- avatica/docs/docker.html | 32 +++ avatica/docs/go_client_reference.html | 2 +- avatica/docs/go_history.html | 2 +- avatica/docs/go_howto.html | 2 +- avatica/docs/history.html | 105 - avatica/docs/howto.html| 6 +- avatica/docs/index.html| 2 +- avatica/docs/json_reference.html | 2 +- avatica/docs/protobuf_reference.html | 2 +- avatica/docs/protocol_testing.html | 2 +- avatica/docs/roadmap.html | 2 +- avatica/docs/security.html | 2 +- avatica/downloads/avatica-go.html | 2 +- avatica/downloads/avatica.html | 2 +- avatica/downloads/index.html | 2 +- avatica/index.html | 2 +- .../news/2016/03/04/separate-project/index.html| 2 +- avatica/news/2016/03/18/release-1.7.1/index.html | 2 +- avatica/news/2016/06/04/release-1.8.0/index.html | 2 +- avatica/news/2016/11/01/release-1.9.0/index.html | 2 +- .../2017/03/31/new-avatica-repository/index.html | 2 +- avatica/news/2017/05/30/release-1.10.0/index.html | 2 +- avatica/news/2018/03/09/release-1.11.0/index.html | 2 +- .../2018/04/27/release-avatica-go-3.0.0/index.html | 2 +- avatica/news/2018/06/24/release-1.12.0/index.html | 2 +- .../2018/09/10/release-avatica-go-3.1.0/index.html | 2 +- .../2018/09/18/release-avatica-go-3.2.0/index.html | 2 +- avatica/news/2018/12/04/release-1.13.0/index.html | 2 +- avatica/news/2019/04/29/release-1.14.0/index.html | 2 +- avatica/news/2019/05/13/release-1.15.0/index.html | 2 +- .../2019/05/16/release-avatica-go-4.0.0/index.html | 2 +- avatica/news/2019/12/19/release-1.16.0/index.html | 2 +- avatica/news/2020/06/22/release-1.17.0/index.html | 2 +- .../2020/07/16/release-avatica-go-5.0.0/index.html | 2 +- avatica/news/2021/05/18/release-1.18.0/index.html | 2 +- avatica/news/2021/10/11/release-1.19.0/index.html | 2 +- avatica/news/2021/12/13/release-1.20.0/index.html | 2 +- .../2022/03/27/release-avatica-go-5.1.0/index.html | 2 +- avatica/news/2022/05/08/release-1.21.0/index.html | 2 +- avatica/news/2022/07/28/release-1.22.0/index.html | 2 +- .../2022/10/13/release-avatica-go-5.2.0/index.html | 2 +- avatica/news/avatica-go-releases/index.html| 2 +- avatica/news/avatica-releases/index.html | 2 +- avatica/news/index.html| 2 +- 50 files changed, 170 insertions(+), 67 deletions(-) diff --git a/avatica/develop/avatica-go.html b/avatica/develop/avatica-go.html index 7d522c95..0a0682b1 100644 --- a/avatica/develop/avatica-go.html +++ b/avatica/develop/avatica-go.html @@ -182,7 +182,7 @@ PHOENIX_HOST: http://phoenix:8765 - The contents of this website are © 2022 + The contents of this website are © 2023 https://www.apache.org/";>Apache Software Foundation under the terms of the https://www.apache.org/licenses/LICENSE-2.0.html";> diff --git a/avatica/develop/avatica.html b/avatica/develop/avatica.html index d99e59b2..5dc52f84 100644 --- a/avatica/develop/avatica.html +++ b/avatica/develop/avatica.html @@ -185,7 +185,7 @@ or just by answering questions on the list. - The contents of this website are © 2022 + The contents of this website are © 2023 https://www.apache.org/";>Apache Software Foundation under the terms of the https://www.apache.org/licenses/LICENSE-2.0.html";> diff --git a/avatica/develop/index.html b/avatica/develop/index.html index 02bea3bb..5d68438c 100644 --- a/avatica/develop/index.html +++ b/avatica/develop/index.html @@ -121,7 +121,7 @@ - The contents of this website are © 2022 + The contents of this website are © 2023 https://www.apache.or
[calcite-avatica] branch main updated (ac47eb619 -> 359135bfd)
This is an automated email from the ASF dual-hosted git repository. jhyde pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git from ac47eb619 [CALCITE-5120] UnregisteredDriver#connect should throw SQLException, not NullPointerException, if url is null add 810acf807 [CALCITE-3557] ResultSet.getObject throws ClassCastException when applied to an ARRAY or MULTISET inside a MULTISET new 359135bfd [CALCITE-5443] After Statement.getMoreResults() has returned false, Statement.getUpdateCount() should return -1 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: NOTICE | 2 +- README | 2 +- .../apache/calcite/avatica/AvaticaStatement.java | 1 + .../calcite/avatica/util/AbstractCursor.java | 8 +- .../apache/calcite/avatica/AvaticaMatchers.java| 3 + .../calcite/avatica/AvaticaStatementTest.java | 28 ++- .../calcite/avatica/util/ArrayAccessorTest.java| 79 + site/_docs/docker_images.md| 28 +++ site/_docs/history.md | 98 ++ site/_docs/howto.md| 4 +- 10 files changed, 215 insertions(+), 38 deletions(-)
[calcite-avatica] 01/01: [CALCITE-5443] After Statement.getMoreResults() has returned false, Statement.getUpdateCount() should return -1
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 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 + * https://issues.apache.org/jira/browse/CALCITE-2140>[CALCITE-2140] + * Basic implementation of Statement#getMoreResults() 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 + * https://issues.apache.org/jira/browse/CALCITE-5443>[CALCITE-5443] + * After Statement.getMoreResults() has returned false, + * Statement.getUpdateCount() should return -1 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 `docke
[GitHub] [calcite-avatica] julianhyde closed pull request #179: [CALCITE-3557] ClassCastException for using nested multiset or array …
julianhyde closed pull request #179: [CALCITE-3557] ClassCastException for using nested multiset or array … URL: https://github.com/apache/calcite-avatica/pull/179 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite-avatica] julianhyde closed pull request #201: [CALCITE-5443] Reset update count when checking for more results
julianhyde closed pull request #201: [CALCITE-5443] Reset update count when checking for more results URL: https://github.com/apache/calcite-avatica/pull/201 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[calcite] branch main updated: [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by
This is an automated email from the ASF dual-hosted git repository. dmsysolyatin pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite.git The following commit(s) were added to refs/heads/main by this push: new 717eb59a73 [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by 717eb59a73 is described below commit 717eb59a73e2b456266da1af5ff9b881b6f7eeed Author: dssysolyatin AuthorDate: Tue Nov 15 16:41:38 2022 +0200 [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by --- .../apache/calcite/sql2rel/SqlToRelConverter.java | 65 ++ core/src/test/resources/sql/agg.iq | 33 +++ 2 files changed, 75 insertions(+), 23 deletions(-) diff --git a/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java b/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java index 1e5a9ab8aa..97e1dcfecf 100644 --- a/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java +++ b/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java @@ -71,6 +71,7 @@ import org.apache.calcite.rel.logical.LogicalUnion; import org.apache.calcite.rel.logical.LogicalValues; import org.apache.calcite.rel.metadata.RelColumnMapping; import org.apache.calcite.rel.metadata.RelMetadataQuery; +import org.apache.calcite.rel.rel2sql.SqlImplementor; import org.apache.calcite.rel.stream.Delta; import org.apache.calcite.rel.stream.LogicalDelta; import org.apache.calcite.rel.type.RelDataType; @@ -1136,7 +1137,15 @@ public class SqlToRelConverter { final Blackboard bb, final SqlNode expr, RelOptUtil.Logic logic) { -findSubQueries(bb, expr, logic, false); +replaceSubQueries(bb, expr, logic, null); + } + + private void replaceSubQueries( + final Blackboard bb, + final SqlNode expr, + RelOptUtil.Logic logic, + final SqlImplementor.@Nullable Clause clause) { +findSubQueries(bb, expr, logic, false, clause); for (SubQuery node : bb.subQueryList) { substituteSubQuery(bb, node); } @@ -2018,12 +2027,14 @@ public class SqlToRelConverter { * corresponds to a variation of a select * node, only register it if it's a scalar * sub-query + * @param clause A clause inside which sub-query is searched */ private void findSubQueries( Blackboard bb, SqlNode node, RelOptUtil.Logic logic, - boolean registerOnlyScalarSubQueries) { + boolean registerOnlyScalarSubQueries, + SqlImplementor.@Nullable Clause clause) { final SqlKind kind = node.getKind(); switch (kind) { case EXISTS: @@ -2038,7 +2049,7 @@ public class SqlToRelConverter { case SCALAR_QUERY: if (!registerOnlyScalarSubQueries || (kind == SqlKind.SCALAR_QUERY)) { -bb.registerSubQuery(node, RelOptUtil.Logic.TRUE_FALSE); +bb.registerSubQuery(node, RelOptUtil.Logic.TRUE_FALSE, clause); } return; case IN: @@ -2070,7 +2081,7 @@ public class SqlToRelConverter { findSubQueries(bb, operand, logic, kind == SqlKind.IN || kind == SqlKind.NOT_IN || kind == SqlKind.SOME || kind == SqlKind.ALL - || registerOnlyScalarSubQueries); + || registerOnlyScalarSubQueries, clause); } } } else if (node instanceof SqlNodeList) { @@ -2078,7 +2089,7 @@ public class SqlToRelConverter { findSubQueries(bb, child, logic, kind == SqlKind.IN || kind == SqlKind.NOT_IN || kind == SqlKind.SOME || kind == SqlKind.ALL -|| registerOnlyScalarSubQueries); +|| registerOnlyScalarSubQueries, clause); } } @@ -2107,7 +2118,7 @@ public class SqlToRelConverter { default: break; } - bb.registerSubQuery(node, logic); + bb.registerSubQuery(node, logic, clause); break; default: break; @@ -3376,13 +3387,13 @@ public class SqlToRelConverter { // also replace sub-queries inside ordering spec in the aggregates replaceSubQueries(bb, aggregateFinder.orderList, RelOptUtil.Logic.TRUE_FALSE_UNKNOWN); - // If group-by clause is missing, pretend that it has zero elements. if (groupList == null) { groupList = SqlNodeList.EMPTY; } -replaceSubQueries(bb, groupList, RelOptUtil.Logic.TRUE_FALSE_UNKNOWN); +replaceSubQueries(bb, groupList, RelOptUtil.Logic.TRUE_FALSE_UNKNOWN, +SqlImplementor.Clause.GROUP_BY); // register the group exprs @@ -3474,7 +3485,8 @@ public class SqlToRelConverter { // This needs to be done separately from the sub-query inside // any aggregate in the select list, and after the aggregate rel // is allocated. - replaceSubQueries(bb,
[GitHub] [calcite] dssysolyatin merged pull request #2974: [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by
dssysolyatin merged PR #2974: URL: https://github.com/apache/calcite/pull/2974 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] libenchao commented on pull request #2974: [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by
libenchao commented on PR #2974: URL: https://github.com/apache/calcite/pull/2974#issuecomment-1383136327 LGTM~ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] sonarcloud[bot] commented on pull request #2974: [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by
sonarcloud[bot] commented on PR #2974: URL: https://github.com/apache/calcite/pull/2974#issuecomment-1383109216 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=2974) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=2974&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=2974&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=2974&resolved=false&types=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=CODE_SMELL) [![96.2%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png '96.2%')](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=2974&metric=new_coverage&view=list) [96.2% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=2974&metric=new_coverage&view=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=2974&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=2974&metric=new_duplicated_lines_density&view=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] dssysolyatin commented on a diff in pull request #2974: [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by
dssysolyatin commented on code in PR #2974: URL: https://github.com/apache/calcite/pull/2974#discussion_r1070548010 ## core/src/test/resources/sql/agg.iq: ## @@ -3467,4 +3467,38 @@ order by ename, deptno; !ok +# Test cases for [CALCITE-5209] ArrayIndexOutOfBoundsException during SqlToRelConverter for group-by on `case` +# having `in` expression predicates exceeding SqlRelConverter.Config InSubQueryThreshold +!use scott +select +case when deptno in (1, 2, 3, 4, 5) THEN 1 else 0 end +from emp +group by +case when deptno in (1, 2, 3, 4, 5) THEN 1 else 0 end; + +++ +| EXPR$0 | +++ +| 0 | +++ +(1 row) + +!ok + +!set insubquerythreshold 5 +select +case when deptno in (1, 2, 3, 4, 5) THEN 1 else 0 end Review Comment: @libenchao Done. I also rebased branch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] sonarcloud[bot] commented on pull request #2974: [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by
sonarcloud[bot] commented on PR #2974: URL: https://github.com/apache/calcite/pull/2974#issuecomment-1383106352 Kudos, SonarCloud Quality Gate passed! [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=2974) [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=BUG) [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=VULNERABILITY) [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=2974&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=2974&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=2974&resolved=false&types=SECURITY_HOTSPOT) [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=2974&resolved=false&types=CODE_SMELL) [![96.2%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/90-16px.png '96.2%')](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=2974&metric=new_coverage&view=list) [96.2% Coverage](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=2974&metric=new_coverage&view=list) [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=2974&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=2974&metric=new_duplicated_lines_density&view=list) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org