You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "kingswanwho (via GitHub)" <gi...@apache.org> on 2023/02/22 09:36:56 UTC

[GitHub] [drill] kingswanwho opened a new pull request, #2763: [MINOR UPDATE]: /docs update for DRILL-8117

kingswanwho opened a new pull request, #2763:
URL: https://github.com/apache/drill/pull/2763

   # [MINOR UPDATE]: /docs update for DRILL-8117
   
   ## Description
   
   Update /docs base on the discussion in https://github.com/apache/drill/pull/2756
   
   ## Documentation
   
   This is a doc update
   
   ## Testing
   N/A
   


-- 
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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [drill] jnturton commented on a diff in pull request #2763: [MINOR UPDATE]: /docs update for DRILL-8117

Posted by "jnturton (via GitHub)" <gi...@apache.org>.
jnturton commented on code in PR #2763:
URL: https://github.com/apache/drill/pull/2763#discussion_r1114071613


##########
docs/dev/ClusterFixture.md:
##########
@@ -125,6 +125,27 @@ In some cases, you may want to change an option in a test. Rather than writing o
 
 Again, you can pass a Java value which the test code will convert to a string, then will build the `ALTER SESSION` command.
 
+# Try-with-resource Style of Creating Single-use Client Fixtures.
+
+The benefit of Cluster Fixture framework is to define specific config for specific clusterFixture and clientFixture as needed flexibly.

Review Comment:
   ```suggestion
   A benefit of the Cluster Fixture framework is the ability to define specific configs for specific clusterFixtures and clientFixtures as needed flexibly.
   ```



##########
docs/dev/ClusterFixture.md:
##########
@@ -156,6 +177,28 @@ It is often very handy, during development, to accumulate a collection of test f
 * The (local) file system location
 * The default format
 
+# Exception Matcher
+
+The `QueryBuilder` provides a clean and concise way to handle Exception match which includes type match and pattern match:

Review Comment:
   ```suggestion
   The `QueryBuilder` provides a clean and concise way to handle UserException matching which includes error type matching and error message pattern matching:
   ```



##########
docs/dev/ClusterFixture.md:
##########
@@ -125,6 +125,27 @@ In some cases, you may want to change an option in a test. Rather than writing o
 
 Again, you can pass a Java value which the test code will convert to a string, then will build the `ALTER SESSION` command.
 
+# Try-with-resource Style of Creating Single-use Client Fixtures.
+
+The benefit of Cluster Fixture framework is to define specific config for specific clusterFixture and clientFixture as needed flexibly.
+
+In some cases, clusterFixture has been initialized, and we need to create several different config clients for different test cases,
+
+We could use try-with-resource style to creating single-use clientFixture.

Review Comment:
   ```suggestion
   Using Java's try-with-resources syntax to create a single-use clientFixture is a convenient way to ensure that the clientFixture will automatically be closed once we've finished with it.
   ```



##########
docs/dev/ClusterFixture.md:
##########
@@ -125,6 +125,27 @@ In some cases, you may want to change an option in a test. Rather than writing o
 
 Again, you can pass a Java value which the test code will convert to a string, then will build the `ALTER SESSION` command.
 
+# Try-with-resource Style of Creating Single-use Client Fixtures.
+
+The benefit of Cluster Fixture framework is to define specific config for specific clusterFixture and clientFixture as needed flexibly.
+
+In some cases, clusterFixture has been initialized, and we need to create several different config clients for different test cases,

Review Comment:
   ```suggestion
   In some cases, clusterFixture has been initialized and we need to create several different config clients for different test cases.
   ```
   ```suggestion
   In some cases, a clusterFixture has been initialized and we need to create several different config clients for different test cases.
   ```



##########
docs/dev/ClusterFixture.md:
##########
@@ -156,6 +177,28 @@ It is often very handy, during development, to accumulate a collection of test f
 * The (local) file system location
 * The default format
 
+# Exception Matcher
+
+The `QueryBuilder` provides a clean and concise way to handle Exception match which includes type match and pattern match:
+
+```
+    @Test
+    public void unsupportedLiteralValidation() throws Exception {
+      String query = "ALTER session SET `%s` = %s";
+
+      client.queryBuilder()
+        .sql(query, ENABLE_VERBOSE_ERRORS_KEY, "DATE '1995-01-01'")
+        .userExceptionMatcher()
+        .expectedType(ErrorType.VALIDATION)
+        .include("Drill doesn't support assigning literals of type")
+        .match();
+    }
+```
+* Use `.userExceptionMatcher` to call UserExceptionMatcher
+* Use `.expectedType` to define expected Error type
+* Use `.include` to define expected Error pattern

Review Comment:
   ```suggestion
   * Use `.include` to define an expected error message regex pattern
   * Use `.exclude` to define an unexpected error message regex pattern
   ```



-- 
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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [drill] jnturton merged pull request #2763: [MINOR UPDATE]: /docs update for DRILL-8117

Posted by "jnturton (via GitHub)" <gi...@apache.org>.
jnturton merged PR #2763:
URL: https://github.com/apache/drill/pull/2763


-- 
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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [drill] jnturton commented on a diff in pull request #2763: [MINOR UPDATE]: /docs update for DRILL-8117

Posted by "jnturton (via GitHub)" <gi...@apache.org>.
jnturton commented on code in PR #2763:
URL: https://github.com/apache/drill/pull/2763#discussion_r1114070404


##########
docs/dev/ClusterFixture.md:
##########
@@ -125,6 +125,27 @@ In some cases, you may want to change an option in a test. Rather than writing o
 
 Again, you can pass a Java value which the test code will convert to a string, then will build the `ALTER SESSION` command.
 
+# Try-with-resource Style of Creating Single-use Client Fixtures.
+
+The benefit of Cluster Fixture framework is to define specific config for specific clusterFixture and clientFixture as needed flexibly.
+
+In some cases, clusterFixture has been initialized, and we need to create several different config clients for different test cases,

Review Comment:
   ```suggestion
   In some cases, a clusterFixture has been initialized and we need to create several different config clients for different test cases.
   ```



-- 
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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org