You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/09/27 07:40:49 UTC
[2/5] ignite git commit: IGNITE-5898 .NET: Fix QueryDmlExample and
BinaryModeExample
IGNITE-5898 .NET: Fix QueryDmlExample and BinaryModeExample
Enable distributed joins when selecting data
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b4b3fea0
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b4b3fea0
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b4b3fea0
Branch: refs/heads/ignite-3478
Commit: b4b3fea0de3c8280dece2e59bb1a8c30832c31dd
Parents: c6ddd6a
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Sep 26 19:26:02 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Sep 26 19:26:02 2017 +0300
----------------------------------------------------------------------
.../Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs | 11 +++++++++--
.../Apache.Ignite.Examples/Datagrid/QueryDmlExample.cs | 5 ++++-
2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b4b3fea0/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
index 1c430b3..1cc406b 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs
@@ -81,7 +81,11 @@ namespace Apache.Ignite.Examples.Datagrid
new QueryField(NameField, typeof(string)),
new QueryField(CompanyIdField, typeof(int))
},
- Indexes = new[] {new QueryIndex(false, QueryIndexType.FullText, NameField)}
+ Indexes = new[]
+ {
+ new QueryIndex(false, QueryIndexType.FullText, NameField),
+ new QueryIndex(false, QueryIndexType.Sorted, CompanyIdField)
+ }
},
new QueryEntity
{
@@ -174,7 +178,10 @@ namespace Apache.Ignite.Examples.Datagrid
var qry = cache.Query(new SqlQuery(PersonType,
"from Person, Company " +
- "where Person.CompanyId = Company.Id and Company.Name = ?", orgName));
+ "where Person.CompanyId = Company.Id and Company.Name = ?", orgName)
+ {
+ EnableDistributedJoins = true
+ });
Console.WriteLine();
Console.WriteLine(">>> Persons working for " + orgName + ":");
http://git-wip-us.apache.org/repos/asf/ignite/blob/b4b3fea0/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryDmlExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryDmlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryDmlExample.cs
index 2c47c45..10bf1dd 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryDmlExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryDmlExample.cs
@@ -93,7 +93,10 @@ namespace Apache.Ignite.Examples.Datagrid
"select emp._key, emp.name, org.name, emp.salary " +
"from Employee as emp, " +
"\"{0}\".Organization as org " +
- "where emp.organizationId = org._key", OrganizationCacheName));
+ "where emp.organizationId = org._key", OrganizationCacheName))
+ {
+ EnableDistributedJoins = true
+ };
using (var cursor = employeeCache.QueryFields(qry))
{