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

dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 958774133 Grammatical fixes in using-jdbc-driver.
958774133 is described below

commit 958774133a99d9c6035d0bf06b0a8b8fc024b1a4
Author: James Turton <[email protected]>
AuthorDate: Sat Jan 21 12:43:43 2023 +0200

    Grammatical fixes in using-jdbc-driver.
---
 _docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md 
b/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
index 1b81b3dbc..ae50136e0 100644
--- a/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
+++ b/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
@@ -139,18 +139,18 @@ ResultSet ctasResults = 
ctasStatement.executeQuery(ctasQueryText);
 ctasResults.close();
 ctasStatement.close();
 ```
-then it may be that the CTAS statement is still executing, and that is 
unintentionally cancelled before completing depending on good or bad luck with 
respect to timing.
+then it may be that the CTAS statement is still executing, and that it is 
unintentionally cancelled before completing depending on luck with respect to 
timing.
 
-The cancellation of the CTAS statement is usually benign if it spawned only 
one writer fragment, but if it spawned more than one then the chances increase 
that at least one writer will be interrupted before it has finished writing, 
resulting in incomplete or even corrupted output. Even in the benign case, such 
queries conclude in the CANCELLED state rather than the COMPLETED state 
resulting in misleading query logs and profiles.
+This unintended cancellation of the CTAS statement is usually benign if it 
spawned only one writer fragment, but if it spawned more than one then the 
chances increase that at least one writer will be interrupted before it has 
finished writing, resulting in incomplete or even corrupted output. Even the 
benign cases of such queries conclude in the CANCELLED state rather than the 
COMPLETED state resulting in misleading query logs and profiles.
 
-To have CTAS queries reliably run to completion the JDBC client should wait 
for all of the writer fragments to complete before it closes its JDBC resources 
by scrolling through the ResultSet before closing it. Using try-with-resources 
syntax,
+To have CTAS queries reliably run to completion the JDBC client should wait 
for all of the writer fragments to complete by scrolling through the returned 
ResultSet before closing it or the Statement that created it. Using 
try-with-resources syntax,
 
 ```java
 try (
   Statement ctasStatement = conn.createStatement();
   ResultSet ctasResults = ctasStatement.executeQuery(ctasQueryText);
 ) {
-  while (ctasResults.next()); // scroll through results to ensure that we wait 
for query completion
+  while (ctasResults.next()); // scroll through results to ensure that we wait 
for CTAS completion
 }
 ```
       

Reply via email to