You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by is...@apache.org on 2021/04/05 10:24:50 UTC

[ignite] branch master updated: IGNITE-14475: Fix C++ Query Example when run with multiple nodes

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

isapego pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new c608a6c  IGNITE-14475: Fix C++ Query Example when run with multiple nodes
c608a6c is described below

commit c608a6c7da63e309390cc84e121f74d4ead32f7e
Author: Igor Sapego <is...@apache.org>
AuthorDate: Mon Apr 5 13:21:39 2021 +0300

    IGNITE-14475: Fix C++ Query Example when run with multiple nodes
    
    This closes #8970
---
 modules/platforms/cpp/examples/include/ignite/examples/person.h    | 2 +-
 modules/platforms/cpp/examples/query-example/src/query_example.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/platforms/cpp/examples/include/ignite/examples/person.h b/modules/platforms/cpp/examples/include/ignite/examples/person.h
index 7176d43..9e6a01a 100644
--- a/modules/platforms/cpp/examples/include/ignite/examples/person.h
+++ b/modules/platforms/cpp/examples/include/ignite/examples/person.h
@@ -71,7 +71,7 @@ namespace ignite
         // 2) collocation column info (orgId). This is required because of constraint : affinity key must be part of the
         // key.
         struct PersonKey {
-            PersonKey(int64_t _id, int64_t _orgId) : id(_id), orgIdAff(_id)
+            PersonKey(int64_t id, int64_t orgId) : id(id), orgIdAff(orgId)
             {
                 // No-op.
             }
diff --git a/modules/platforms/cpp/examples/query-example/src/query_example.cpp b/modules/platforms/cpp/examples/query-example/src/query_example.cpp
index bab74c4..2b7b2c5 100644
--- a/modules/platforms/cpp/examples/query-example/src/query_example.cpp
+++ b/modules/platforms/cpp/examples/query-example/src/query_example.cpp
@@ -117,8 +117,8 @@ void DoSqlQueryWithJoin()
     // Execute query to get names of all employees.
     std::string sql(
         "select concat(firstName, ' ', lastName), org.name "
-        "from Person, \"Organization\".Organization as org "
-        "where Person.orgId = org._key");
+        "from Person inner join \"Organization\".Organization as org "
+        "on Person.orgId = org._key");
 
     QueryFieldsCursor cursor = cache.Query(SqlFieldsQuery(sql));