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

sk0x50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 0809f615537 IGNITE-27138 Fixed QueryExample by adding a table with 
required column (#7090)
0809f615537 is described below

commit 0809f615537b6c99480aff135005082d0c463df2
Author: HR0027 <[email protected]>
AuthorDate: Fri Dec 5 14:46:27 2025 +0530

    IGNITE-27138 Fixed QueryExample by adding a table with required column 
(#7090)
    
    Co-authored-by: HR0027 <[email protected]>
---
 .../main/java/org/apache/ignite/example/table/QueryExample.java    | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/examples/java/src/main/java/org/apache/ignite/example/table/QueryExample.java 
b/examples/java/src/main/java/org/apache/ignite/example/table/QueryExample.java
index 247d50993bc..5f12b0dd03c 100644
--- 
a/examples/java/src/main/java/org/apache/ignite/example/table/QueryExample.java
+++ 
b/examples/java/src/main/java/org/apache/ignite/example/table/QueryExample.java
@@ -38,6 +38,10 @@ public class QueryExample {
         try (IgniteClient client = IgniteClient.builder()
                 .addresses("127.0.0.1:10800")
                 .build()) {
+            System.out.println("Creating Person table");
+            client.sql().execute(null, "CREATE TABLE IF NOT EXISTS Person (id 
int primary key,  city varchar,  name varchar,  age int,  company varchar, 
city_id int);");
+            client.sql().execute(null, "INSERT INTO Person (id, city, name, 
age, company, city_id) VALUES (1, 'London', 'John Doe', 42, 'Apache', 101);");
+            client.sql().execute(null, "INSERT INTO Person (id, city, name, 
age, company, city_id) VALUES (2, 'New York', 'Jane Doe', 36, 'Apache', 102);");
 
             // Get a table
             IgniteTables tablesApi = client.tables();
@@ -51,6 +55,9 @@ public class QueryExample {
 
             // Example 3: Query asynchronously
             performQueryAsync(myTable);
+
+            System.out.println("Dropping Person table.");
+            client.sql().execute(null, "DROP TABLE IF EXISTS PERSON;");
         }
     }
 

Reply via email to