Copilot commented on code in PR #37733:
URL: https://github.com/apache/shardingsphere/pull/37733#discussion_r2686956875


##########
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md:
##########
@@ -226,8 +250,42 @@ CREATE DATABASE demo_ds_1;
 CREATE DATABASE demo_ds_2;
 ```
 
-After the business project introduces the dependencies involved in the 
`prerequisites`,
-write the ShardingSphere data source configuration file `demo.yaml` on the 
classpath of the business project.
+After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies,

Review Comment:
   Inconsistent punctuation. This line ends with a comma, but should use a 
colon for consistency with standard technical documentation formatting when 
introducing code blocks or lists.
   ```suggestion
   After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies:
   ```



##########
docs/document/content/user-manual/shardingsphere-jdbc/special-api/transaction/seata.en.md:
##########
@@ -217,10 +212,39 @@ config {
 
 ### Add JDBC Driver to the business project and create ShardingSphere 
configuration file
 
-After the business project introduces the dependencies involved in the 
prerequisites, 
-add the Maven dependency of MySQL JDBC Driver.
+After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies,

Review Comment:
   The phrase "including the dependencies related to the `prerequisites`" is 
unclear. Consider clarifying what "prerequisites" refers to - it should 
reference a specific section name or provide more context about which 
dependencies are meant.
   ```suggestion
   After including the dependencies listed in the Prerequisites section in the 
business project, add the following additional dependencies:
   ```



##########
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.en.md:
##########
@@ -98,8 +93,186 @@ truncate table t_order;
 
 ### Create ShardingSphere data source in business project
 
-After the business project introduces the dependencies involved in 
`Prerequisites`, 
-write the ShardingSphere data source configuration file `demo.yaml` on the 
classpath of the business project.
+After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies,

Review Comment:
   Missing comma after "project". The sentence should read "After including the 
dependencies related to the `prerequisites` in the business project, add the 
following additional dependencies,"



##########
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/presto/_index.en.md:
##########
@@ -98,8 +93,186 @@ truncate table t_order;
 
 ### Create ShardingSphere data source in business project
 
-After the business project introduces the dependencies involved in 
`Prerequisites`, 
-write the ShardingSphere data source configuration file `demo.yaml` on the 
classpath of the business project.
+After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies,
+
+```xml
+<dependency>
+    <groupId>org.apache.shardingsphere</groupId>
+    <artifactId>shardingsphere-jdbc</artifactId>
+    <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+    <groupId>org.apache.shardingsphere</groupId>
+    <artifactId>shardingsphere-infra-data-source-pool-hikari</artifactId>
+    <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+    <groupId>org.apache.shardingsphere</groupId>
+    <artifactId>shardingsphere-infra-url-classpath</artifactId>
+    <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+    <groupId>org.apache.shardingsphere</groupId>
+    <artifactId>shardingsphere-standalone-mode-repository-memory</artifactId>
+    <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+    <groupId>org.apache.shardingsphere</groupId>
+    <artifactId>shardingsphere-sharding-core</artifactId>
+    <version>${shardingsphere.version}</version>
+</dependency>
+<dependency>
+    <groupId>org.apache.shardingsphere</groupId>
+    <artifactId>shardingsphere-authority-simple</artifactId>
+    <version>${shardingsphere.version}</version>
+</dependency>
+```
+
+Write the ShardingSphere data source configuration file `demo.yaml` on the 
classpath of the business project.
+
+```yaml
+dataSources:
+    ds_0:
+        dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+        driverClassName: org.apache.hive.jdbc.HiveDriver
+        standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_0
+    ds_1:
+        dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+        driverClassName: org.apache.hive.jdbc.HiveDriver
+        standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_1
+    ds_2:
+        dataSourceClassName: com.zaxxer.hikari.HikariDataSource
+        driverClassName: org.apache.hive.jdbc.HiveDriver
+        standardJdbcUrl: jdbc:hive2://localhost:10000/demo_ds_2
+rules:
+- !SHARDING
+    tables:
+      t_order:
+        actualDataNodes: <LITERAL>ds_0.t_order, ds_1.t_order, ds_2.t_order
+        keyGenerateStrategy:
+          column: order_id
+          keyGeneratorName: snowflake
+    defaultDatabaseStrategy:
+      standard:
+        shardingColumn: user_id
+        shardingAlgorithmName: inline
+    shardingAlgorithms:
+      inline:
+        type: INLINE
+        props:
+          algorithm-expression: ds_${user_id % 2}
+    keyGenerators:
+      snowflake:
+        type: SNOWFLAKE
+```
+
+### Enjoy the integration
+
+Create a ShardingSphere data source to enjoy the integration.
+
+```java
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+public class ExampleUtils {
+    void test() throws SQLException {
+        HikariConfig config = new HikariConfig();
+        config.setJdbcUrl("jdbc:shardingsphere:classpath:demo.yaml");
+        
config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver");
+        try (HikariDataSource dataSource = new HikariDataSource(config);
+             Connection connection = dataSource.getConnection();
+             Statement statement = connection.createStatement()) {
+            statement.execute("CREATE TABLE IF NOT EXISTS t_order (order_id 
BIGINT NOT NULL, order_type INT, user_id INT NOT NULL, address_id BIGINT NOT 
NULL, status string, PRIMARY KEY (order_id) disable novalidate) STORED BY 
ICEBERG STORED AS ORC TBLPROPERTIES ('format-version' = '2')");
+            statement.execute("TRUNCATE TABLE t_order");
+            statement.execute("INSERT INTO t_order (user_id, order_type, 
address_id, status) VALUES (1, 1, 1, 'INSERT_TEST')");
+            statement.executeQuery("SELECT * FROM t_order");
+            statement.execute("DELETE FROM t_order WHERE user_id=1");
+            statement.execute("DROP TABLE IF EXISTS t_order");
+        }
+    }
+}
+```
+
+## External Integration
+
+### Connect to HiveServer2 with ZooKeeper Service Discovery enabled
+
+`standardJdbcUrl` in the ShardingSphere configuration file can be configured 
to connect to HiveServer2 with ZooKeeper Service Discovery enabled.
+
+For discussion, assume that there is the following Docker Compose file to 
start HiveServer2 with ZooKeeper Service Discovery.
+
+```yaml
+name: test-1
+services:
+  zookeeper:
+    image: zookeeper:3.9.4-jre-17
+    ports:
+      - "2181:2181"
+  apache-hive-1:
+    image: apache/hive:4.0.1
+    depends_on:
+      - zookeeper
+    environment:
+      SERVICE_NAME: hiveserver2
+      SERVICE_OPTS: >-
+        -Dhive.server2.support.dynamic.service.discovery=true
+        -Dhive.zookeeper.quorum=zookeeper:2181
+        -Dhive.server2.thrift.bind.host=0.0.0.0
+        -Dhive.server2.thrift.port=10000
+    ports:
+      - "10000:10000"
+```
+
+In DBeaver Community,
+use `standardJdbcUrl` of 
`jdbc:hive2://127.0.0.1:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2`
 to connect to HiveServer2,
+leave `username` and `password` blank.
+Execute the following SQL,
+
+```sql
+-- noinspection SqlNoDataSourceInspectionForFile
+CREATE DATABASE demo_ds_0;
+CREATE DATABASE demo_ds_1;
+CREATE DATABASE demo_ds_2;
+```
+
+After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies,

Review Comment:
   Inconsistent punctuation. This line ends with a comma, but similar 
constructs in other files use a colon. For consistency across documentation, 
consider using a colon.
   ```suggestion
   After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies:
   ```



##########
docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md:
##########
@@ -117,19 +150,19 @@ graalvmNative {
       }
    }
    metadataRepository {
-      enabled.set(false)
+        enabled.set(false)
    }
 }
 ```
 
-### For build tools such as sbt that are not supported by GraalVM Native Build 
Tools
+### sbt
 
-Such requirements require opening additional issues at 
https://github.com/graalvm/native-build-tools 
-and providing the Plugin implementation of the corresponding build tool.
+For build tools such as sbt that are not supported by GraalVM Native Build 
Tools,
+you need to open an additional issue at 
https://github.com/graalvm/native-build-tools and provide the corresponding 
plugin implementation for the build tool.
 
 ## Usage restrictions
 
-1. The following algorithm classes are not available under GraalVM Native 
Image due to the involvement of https://github.com/oracle/graal/issues/5522.
+1. The following algorithm classes are not available under GraalVM Native 
Image due to the involvement of https://github.com/oracle/graal/issues/5522 .

Review Comment:
   Extra space before period. The URL reference should not have a space before 
the period: "https://github.com/oracle/graal/issues/5522."; instead of 
"https://github.com/oracle/graal/issues/5522 ."
   ```suggestion
   1. The following algorithm classes are not available under GraalVM Native 
Image due to the involvement of https://github.com/oracle/graal/issues/5522.
   ```



##########
docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md:
##########
@@ -34,75 +34,108 @@ java.beans.Introspector was unintentionally initialized at 
build time. To see wh
 
 ### Maven Ecology
 
-Users need to actively use the GraalVM Reachability Metadata central 
repository. 
 The following configuration is for reference to configure additional Maven 
Profiles for the project, 
 and the documentation of GraalVM Native Build Tools shall prevail.
 
 ```xml
 <project>
-     <dependencies>
-         <dependency>
-             <groupId>org.apache.shardingsphere</groupId>
-             <artifactId>shardingsphere-jdbc</artifactId>
-             <version>${shardingsphere.version}</version>
-         </dependency>
-     </dependencies>
-    
-     <build>
-         <plugins>
-             <plugin>
-                 <groupId>org.graalvm.buildtools</groupId>
-                 <artifactId>native-maven-plugin</artifactId>
-                 <version>0.11.3</version>
-                 <extensions>true</extensions>
-                 <configuration>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-reachability-metadata</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.graalvm.buildtools</groupId>
+                <artifactId>native-maven-plugin</artifactId>
+                <version>0.11.3</version>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
+```
+
+A more convenient configuration for testing third-party dependencies might 
look like this,
+
+```xml
+<project>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-jdbc</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shardingsphere</groupId>
+            <artifactId>shardingsphere-infra-reachability-metadata</artifactId>
+            <version>${shardingsphere.version}</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.graalvm.buildtools</groupId>
+                <artifactId>native-maven-plugin</artifactId>
+                <version>0.11.3</version>
+                <extensions>true</extensions>
+                <configuration>
                     <buildArgs>
-                       <buildArg>-H:+UnlockExperimentalVMOptions</buildArg>
-                       <buildArg>-H:+AddAllCharsets</buildArg>
-                       <buildArg>-H:+IncludeAllLocales</buildArg>
+                        <buildArg>-H:+UnlockExperimentalVMOptions</buildArg>
+                        <buildArg>-H:+AddAllCharsets</buildArg>
+                        <buildArg>-H:+IncludeAllLocales</buildArg>
                     </buildArgs>
-                 </configuration>
-                 <executions>
-                     <execution>
-                         <id>build-native</id>
-                         <goals>
-                             <goal>compile-no-fork</goal>
-                         </goals>
-                         <phase>package</phase>
-                     </execution>
-                     <execution>
-                         <id>test-native</id>
-                         <goals>
-                             <goal>test</goal>
-                         </goals>
-                         <phase>test</phase>
-                     </execution>
-                 </executions>
-             </plugin>
-         </plugins>
-     </build>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>build-native</id>
+                        <goals>
+                            <goal>compile-no-fork</goal>
+                        </goals>
+                        <phase>package</phase>
+                    </execution>
+                    <execution>
+                        <id>test-native</id>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                        <phase>test</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>
 ```
 
 ### Gradle Ecosystem
 
-Users need to actively use the GraalVM Reachability Metadata central 
repository.
 The following configuration is for reference to configure additional Gradle 
Tasks for the project,
 and the documentation of GraalVM Native Build Tools shall prevail.
-Due to the limitations of https://github.com/gradle/gradle/issues/17559 , 
-users need to introduce the JSON file of Metadata Repository through Maven 
dependency. 
-Reference https://github.com/graalvm/native-build-tools/issues/572 .
 
 ```groovy
 plugins {
    id 'org.graalvm.buildtools.native' version '0.11.3'
 }
+dependencies {
+   implementation 
'org.apache.shardingsphere:shardingsphere-infra-reachability-metadata:${shardingsphere.version}'
+}
+```
 
+A more convenient configuration for testing third-party dependencies might 
look like this. Due to limitations outlined in 
https://github.com/gradle/gradle/issues/17559 , users may need to include the 
Metadata Repository's JSON file as a Maven dependency. See 
https://github.com/graalvm/native-build-tools/issues/572 .

Review Comment:
   Inconsistent sentence structure. The phrase "A more convenient configuration 
for testing third-party dependencies might look like this. Due to limitations 
outlined in https://github.com/gradle/gradle/issues/17559 , users may need to 
include the Metadata Repository's JSON file as a Maven dependency." contains an 
awkward break between sentences. Consider: "A more convenient configuration for 
testing third-party dependencies might look like this. Due to limitations 
outlined in https://github.com/gradle/gradle/issues/17559, users may need to 
include the Metadata Repository's JSON file as a Maven dependency." (note the 
space before comma should also be removed)
   ```suggestion
   A more convenient configuration for testing third-party dependencies might 
look like this. Due to limitations outlined in 
https://github.com/gradle/gradle/issues/17559, users may need to include the 
Metadata Repository's JSON file as a Maven dependency. See 
https://github.com/graalvm/native-build-tools/issues/572 .
   ```



##########
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/firebird/_index.en.md:
##########
@@ -84,8 +79,42 @@ class Solution {
 
 ### Create ShardingSphere data source in business project
 
-After the business project introduces the dependencies involved in the 
`prerequisites`, 
-write the ShardingSphere data source configuration file `demo.yaml` on the 
classpath of the business project.
+After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies,

Review Comment:
   Inconsistent punctuation. This line ends with a comma, but should use a 
colon for consistency with standard technical documentation formatting when 
introducing code blocks or lists.



##########
docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.en.md:
##########
@@ -354,7 +354,8 @@ without it being registered for runtime reflection. Add 
com.oracle.svm.core.code
   
[email protected]/javax.management.StandardMBean.<init>(StandardMBean.java:268)
 ```
 
-The relevant warning cannot be avoided on `GraalVM CE For JDK 24.0.2`.
-Because the no-argument constructor of 
`com.oracle.svm.core.code.CodeCachePoolMXBean` is marked as an element that is 
only visible during Native Image generation and cannot be used at Runtime, 
-regardless of the actual Platform,
-through the Java class `org.graalvm.nativeimage.Platform.HOSTED_ONLY`.
+The related warnings cannot be avoided at this time.
+This is because the parameterless constructor of 
`com.oracle.svm.core.code.CodeCachePoolMXBean` is marked via the Java class 
`org.graalvm.nativeimage.Platform.HOSTED_ONLY` as an element visible only 
during Native Image generation and unusable at runtime, regardless of the 
actual Platform.

Review Comment:
   Awkward phrasing. The sentence "This is because the parameterless 
constructor of `com.oracle.svm.core.code.CodeCachePoolMXBean` is marked via the 
Java class `org.graalvm.nativeimage.Platform.HOSTED_ONLY` as an element visible 
only during Native Image generation and unusable at runtime, regardless of the 
actual Platform." is grammatically correct but could be clearer. Consider: 
"This is because the parameterless constructor of 
`com.oracle.svm.core.code.CodeCachePoolMXBean` is marked, via the Java class 
`org.graalvm.nativeimage.Platform.HOSTED_ONLY`, as an element that is visible 
only during Native Image generation and unusable at runtime, regardless of the 
actual platform."
   ```suggestion
   This is because the parameterless constructor of 
`com.oracle.svm.core.code.CodeCachePoolMXBean` is marked, via the Java class 
`org.graalvm.nativeimage.Platform.HOSTED_ONLY`, as an element that is visible 
only during Native Image generation and unusable at runtime, regardless of the 
actual platform.
   ```



##########
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md:
##########
@@ -93,8 +88,42 @@ TRUNCATE TABLE t_order;
 
 ### Create ShardingSphere data source in business project
 
-After the business project introduces the dependencies involved in 
`prerequisites`, 
-write the ShardingSphere data source configuration file `demo.yaml` on the 
classpath of the business project.
+After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies,

Review Comment:
   Inconsistent punctuation. This line ends with a comma, but should use a 
colon for consistency with standard technical documentation formatting when 
introducing code blocks or lists.
   ```suggestion
   After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies:
   ```



##########
docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md:
##########
@@ -116,8 +106,42 @@ CREATE DATABASE demo_ds_2;
 
 ### Create ShardingSphere data source in business projects
 
-After the business project introduces the dependencies involved in 
`prerequisites`, 
-write the ShardingSphere data source configuration file `demo.yaml` on the 
classpath of the business project.
+After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies,

Review Comment:
   Inconsistent punctuation. This line ends with a comma, but should use a 
colon for consistency with standard technical documentation formatting when 
introducing code blocks or lists.
   ```suggestion
   After including the dependencies related to the `prerequisites` in the 
business project, add the following additional dependencies:
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to