Skip to content

Commit 7f45d6a

Browse files
committed
WIP C++
1 parent 5bf8009 commit 7f45d6a

13 files changed

Lines changed: 3 additions & 194 deletions

File tree

modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ namespace ignite
5454
loc(false),
5555
distributedJoins(false),
5656
enforceJoinOrder(false),
57-
lazy(true),
5857
args()
5958
{
6059
// No-op.
@@ -73,7 +72,6 @@ namespace ignite
7372
loc(loc),
7473
distributedJoins(false),
7574
enforceJoinOrder(false),
76-
lazy(true),
7775
args()
7876
{
7977
// No-op.
@@ -91,7 +89,6 @@ namespace ignite
9189
loc(other.loc),
9290
distributedJoins(other.distributedJoins),
9391
enforceJoinOrder(other.enforceJoinOrder),
94-
lazy(other.lazy),
9592
args()
9693
{
9794
args.reserve(other.args.size());
@@ -147,7 +144,6 @@ namespace ignite
147144
swap(loc, other.loc);
148145
swap(distributedJoins, other.distributedJoins);
149146
swap(enforceJoinOrder, other.enforceJoinOrder);
150-
swap(lazy, other.lazy);
151147
swap(args, other.args);
152148
}
153149
}
@@ -214,40 +210,6 @@ namespace ignite
214210
this->loc = loc;
215211
}
216212

217-
/**
218-
* Gets lazy query execution flag.
219-
*
220-
* See SetLazy(bool) for more information.
221-
*
222-
* @return Lazy flag.
223-
* @deprecated Deprecated for removal. Use the page size instead.
224-
*/
225-
bool IsLazy() const
226-
{
227-
return lazy;
228-
}
229-
230-
/**
231-
* Sets lazy query execution flag.
232-
*
233-
* By default Ignite attempts to fetch the whole query result set to memory and send it to the client.
234-
* For small and medium result sets this provides optimal performance and minimize duration of internal
235-
* database locks, thus increasing concurrency.
236-
*
237-
* If result set is too big to fit in available memory this could lead to excessive GC pauses and even
238-
* OutOfMemoryError. Use this flag as a hint for Ignite to fetch result set lazily, thus minimizing
239-
* memory consumption at the cost of moderate performance hit.
240-
*
241-
* Defaults to @c false, meaning that the whole result set is fetched to memory eagerly.
242-
*
243-
* @param lazy Lazy query execution flag.
244-
* @deprecated Deprecated for removal. Use the page size instead.
245-
*/
246-
void SetLazy(bool lazy)
247-
{
248-
this->lazy = lazy;
249-
}
250-
251213
/**
252214
* Checks if join order of tables if enforced.
253215
*
@@ -378,7 +340,7 @@ namespace ignite
378340

379341
writer.WriteBool(distributedJoins);
380342
writer.WriteBool(enforceJoinOrder);
381-
writer.WriteBool(lazy);
343+
writer.WriteBool(true); // Lazy flag.
382344
writer.WriteInt32(0); // Timeout, ms
383345
writer.WriteBool(false); // ReplicatedOnly
384346
writer.WriteBool(false); // Colocated
@@ -411,9 +373,6 @@ namespace ignite
411373
/** Enforce join order flag. */
412374
bool enforceJoinOrder;
413375

414-
/** Lazy flag. */
415-
bool lazy;
416-
417376
/** Arguments. */
418377
std::vector<impl::WritableObjectBase*> args;
419378
};

modules/platforms/cpp/odbc-test/src/configuration_test.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ namespace
4242
const bool testEnforceJoinOrder = true;
4343
const bool testReplicatedOnly = true;
4444
const bool testCollocated = true;
45-
const bool testLazy = true;
4645
const bool testSkipReducerOnUpdate = true;
4746
const EngineMode::Type testEngineMode = EngineMode::H2;
4847

@@ -186,7 +185,6 @@ void CheckConnectionConfig(const Configuration& cfg)
186185
BOOST_CHECK_EQUAL(cfg.IsEnforceJoinOrder(), testEnforceJoinOrder);
187186
BOOST_CHECK_EQUAL(cfg.IsReplicatedOnly(), testReplicatedOnly);
188187
BOOST_CHECK_EQUAL(cfg.IsCollocated(), testCollocated);
189-
BOOST_CHECK_EQUAL(cfg.IsLazy(), testLazy);
190188
BOOST_CHECK_EQUAL(cfg.IsSkipReducerOnUpdate(), testSkipReducerOnUpdate);
191189
BOOST_CHECK_EQUAL(cfg.GetEngineMode(), testEngineMode);
192190

@@ -209,7 +207,6 @@ void CheckConnectionConfig(const Configuration& cfg)
209207
<< "distributed_joins=" << BoolToStr(testDistributedJoins) << ';'
210208
<< "driver={" << testDriverName << "};"
211209
<< "enforce_join_order=" << BoolToStr(testEnforceJoinOrder) << ';'
212-
<< "lazy=" << BoolToStr(testLazy) << ';'
213210
<< "page_size=" << testPageSize << ';'
214211
<< "query_engine=" << EngineMode::ToString(testEngineMode) << ';'
215212
<< "replicated_only=" << BoolToStr(testReplicatedOnly) << ';'
@@ -233,7 +230,6 @@ void CheckDsnConfig(const Configuration& cfg)
233230
BOOST_CHECK_EQUAL(cfg.IsEnforceJoinOrder(), false);
234231
BOOST_CHECK_EQUAL(cfg.IsReplicatedOnly(), false);
235232
BOOST_CHECK_EQUAL(cfg.IsCollocated(), false);
236-
BOOST_CHECK_EQUAL(cfg.IsLazy(), false);
237233
BOOST_CHECK_EQUAL(cfg.IsSkipReducerOnUpdate(), false);
238234
BOOST_CHECK(cfg.GetAddresses().empty());
239235
}
@@ -252,7 +248,6 @@ BOOST_AUTO_TEST_CASE(CheckTestValuesNotEquealDefault)
252248
BOOST_CHECK_NE(testEnforceJoinOrder, Configuration::DefaultValue::enforceJoinOrder);
253249
BOOST_CHECK_NE(testReplicatedOnly, Configuration::DefaultValue::replicatedOnly);
254250
BOOST_CHECK_NE(testCollocated, Configuration::DefaultValue::collocated);
255-
BOOST_CHECK_NE(testLazy, Configuration::DefaultValue::lazy);
256251
BOOST_CHECK_NE(testSkipReducerOnUpdate, Configuration::DefaultValue::skipReducerOnUpdate);
257252
BOOST_CHECK_NE(testEngineMode, Configuration::DefaultValue::engineMode);
258253
}
@@ -264,7 +259,6 @@ BOOST_AUTO_TEST_CASE(TestConnectStringUppercase)
264259
std::stringstream constructor;
265260

266261
constructor << "DRIVER={" << testDriverName << "};"
267-
<< "LAZY=" << BoolToStr(testLazy, false) << ';'
268262
<< "ADDRESS=" << testAddressStr << ';'
269263
<< "DISTRIBUTED_JOINS=" << BoolToStr(testDistributedJoins, false) << ';'
270264
<< "ENFORCE_JOIN_ORDER=" << BoolToStr(testEnforceJoinOrder, false) << ';'
@@ -289,7 +283,6 @@ BOOST_AUTO_TEST_CASE(TestConnectStringLowercase)
289283
std::stringstream constructor;
290284

291285
constructor << "driver={" << testDriverName << "};"
292-
<< "lazy=" << BoolToStr(testLazy) << ';'
293286
<< "address=" << testAddressStr << ';'
294287
<< "page_size=" << testPageSize << ';'
295288
<< "distributed_joins=" << BoolToStr(testDistributedJoins) << ';'
@@ -315,7 +308,6 @@ BOOST_AUTO_TEST_CASE(TestConnectStringZeroTerminated)
315308

316309
constructor << "driver={" << testDriverName << "};"
317310
<< "address=" << testAddressStr << ';'
318-
<< "lazy=" << BoolToStr(testLazy) << ';'
319311
<< "page_size=" << testPageSize << ';'
320312
<< "replicated_only=" << BoolToStr(testReplicatedOnly) << ';'
321313
<< "collocated=" << BoolToStr(testCollocated) << ';'
@@ -341,7 +333,6 @@ BOOST_AUTO_TEST_CASE(TestConnectStringMixed)
341333
std::stringstream constructor;
342334

343335
constructor << "Driver={" << testDriverName << "};"
344-
<< "Lazy=" << BoolToStr(testLazy) << ';'
345336
<< "Address=" << testAddressStr << ';'
346337
<< "Page_Size=" << testPageSize << ';'
347338
<< "Distributed_Joins=" << BoolToStr(testDistributedJoins, false) << ';'
@@ -369,7 +360,6 @@ BOOST_AUTO_TEST_CASE(TestConnectStringWhitepaces)
369360
<< " ADDRESS =" << testAddressStr << "; "
370361
<< " PAGE_SIZE= " << testPageSize << ';'
371362
<< " DISTRIBUTED_JOINS=" << BoolToStr(testDistributedJoins, false) << ';'
372-
<< "LAZY=" << BoolToStr(testLazy, false) << ';'
373363
<< "COLLOCATED =" << BoolToStr(testCollocated, false) << " ;"
374364
<< " REPLICATED_ONLY= " << BoolToStr(testReplicatedOnly, false) << ';'
375365
<< "ENFORCE_JOIN_ORDER= " << BoolToStr(testEnforceJoinOrder, false) << " ;"
@@ -464,7 +454,6 @@ BOOST_AUTO_TEST_CASE(TestConnectStringInvalidBoolKeys)
464454
keys.insert("enforce_join_order");
465455
keys.insert("replicated_only");
466456
keys.insert("collocated");
467-
keys.insert("lazy");
468457
keys.insert("skip_reducer_on_update");
469458

470459
for (Set::const_iterator it = keys.begin(); it != keys.end(); ++it)
@@ -492,7 +481,6 @@ BOOST_AUTO_TEST_CASE(TestConnectStringValidBoolKeys)
492481
keys.insert("enforce_join_order");
493482
keys.insert("replicated_only");
494483
keys.insert("collocated");
495-
keys.insert("lazy");
496484
keys.insert("skip_reducer_on_update");
497485

498486
for (Set::const_iterator it = keys.begin(); it != keys.end(); ++it)

modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ namespace ignite
9494
/** Default value for collocated attribute. */
9595
static const bool collocated;
9696

97-
/** Default value for lazy attribute. */
98-
static const bool lazy;
99-
10097
/** Default value for skipReducerOnUpdate attribute. */
10198
static const bool skipReducerOnUpdate;
10299

@@ -414,27 +411,6 @@ namespace ignite
414411
*/
415412
bool IsCollocatedSet() const;
416413

417-
/**
418-
* Check lazy flag.
419-
*
420-
* @return True if lazy is enabled.
421-
*/
422-
bool IsLazy() const;
423-
424-
/**
425-
* Set lazy.
426-
*
427-
* @param val Value to set.
428-
*/
429-
void SetLazy(bool val);
430-
431-
/**
432-
* Check if the value set.
433-
*
434-
* @return @true if the value set.
435-
*/
436-
bool IsLazySet() const;
437-
438414
/**
439415
* Check update on server flag.
440416
*
@@ -609,9 +585,6 @@ namespace ignite
609585
/** Collocated flag. */
610586
SettableValue<bool> collocated;
611587

612-
/** Lazy flag. */
613-
SettableValue<bool> lazy;
614-
615588
/** Skip reducer on update flag. */
616589
SettableValue<bool> skipReducerOnUpdate;
617590

modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_string_parser.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ namespace ignite
7474
/** Connection attribute keyword for collocated attribute. */
7575
static const std::string collocated;
7676

77-
/** Connection attribute keyword for lazy attribute. */
78-
static const std::string lazy;
79-
8077
/** Connection attribute keyword for skipReducerOnUpdate attribute. */
8178
static const std::string skipReducerOnUpdate;
8279

modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ namespace ignite
5757
ENFORCE_JOIN_ORDER_CHECK_BOX,
5858
REPLICATED_ONLY_CHECK_BOX,
5959
COLLOCATED_CHECK_BOX,
60-
LAZY_CHECK_BOX,
6160
SKIP_REDUCER_ON_UPDATE_CHECK_BOX,
6261
PROTOCOL_VERSION_LABEL,
6362
PROTOCOL_VERSION_COMBO_BOX,
@@ -260,9 +259,6 @@ namespace ignite
260259
/** Collocated CheckBox. */
261260
std::auto_ptr<Window> collocatedCheckBox;
262261

263-
/** Lazy CheckBox. */
264-
std::auto_ptr<Window> lazyCheckBox;
265-
266262
/** Update on server CheckBox. */
267263
std::auto_ptr<Window> skipReducerOnUpdateCheckBox;
268264

modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,6 @@ namespace ignite
353353

354354
rowPos += ROW_HEIGHT;
355355

356-
lazyCheckBox = CreateCheckBox(labelPosX, rowPos, checkBoxSize, ROW_HEIGHT,
357-
"Lazy", ChildId::LAZY_CHECK_BOX, config.IsLazy());
358-
359-
lazyCheckBox->SetEnabled(version >= ProtocolVersion::VERSION_2_1_5);
360-
361356
skipReducerOnUpdateCheckBox = CreateCheckBox(labelPosX + checkBoxSize + INTERVAL, rowPos,
362357
checkBoxSize, ROW_HEIGHT, "Skip reducer on update", ChildId::SKIP_REDUCER_ON_UPDATE_CHECK_BOX,
363358
config.IsSkipReducerOnUpdate());
@@ -434,13 +429,6 @@ namespace ignite
434429
break;
435430
}
436431

437-
case ChildId::LAZY_CHECK_BOX:
438-
{
439-
lazyCheckBox->SetChecked(!lazyCheckBox->IsChecked());
440-
441-
break;
442-
}
443-
444432
case ChildId::SKIP_REDUCER_ON_UPDATE_CHECK_BOX:
445433
{
446434
skipReducerOnUpdateCheckBox->SetChecked(!skipReducerOnUpdateCheckBox->IsChecked());
@@ -454,7 +442,6 @@ namespace ignite
454442
protocolVersionComboBox->GetText(versionStr);
455443

456444
ProtocolVersion version = ProtocolVersion::FromString(versionStr);
457-
lazyCheckBox->SetEnabled(version >= ProtocolVersion::VERSION_2_1_5);
458445
skipReducerOnUpdateCheckBox->SetEnabled(version >= ProtocolVersion::VERSION_2_3_0);
459446
engineModeComboBox->SetEnabled(version >= ProtocolVersion::VERSION_2_13_0);
460447

@@ -613,7 +600,6 @@ namespace ignite
613600
bool enforceJoinOrder = enforceJoinOrderCheckBox->IsChecked();
614601
bool replicatedOnly = replicatedOnlyCheckBox->IsChecked();
615602
bool collocated = collocatedCheckBox->IsChecked();
616-
bool lazy = lazyCheckBox->IsChecked();
617603
bool skipReducerOnUpdate = skipReducerOnUpdateCheckBox->IsChecked();
618604

619605
LOG_MSG("Retrieving arguments:");
@@ -623,7 +609,6 @@ namespace ignite
623609
LOG_MSG("Enforce Join Order: " << (enforceJoinOrder ? "true" : "false"));
624610
LOG_MSG("Replicated only: " << (replicatedOnly ? "true" : "false"));
625611
LOG_MSG("Collocated: " << (collocated ? "true" : "false"));
626-
LOG_MSG("Lazy: " << (lazy ? "true" : "false"));
627612
LOG_MSG("Skip reducer on update: " << (skipReducerOnUpdate ? "true" : "false"));
628613

629614
cfg.SetPageSize(pageSize);
@@ -632,7 +617,6 @@ namespace ignite
632617
cfg.SetEnforceJoinOrder(enforceJoinOrder);
633618
cfg.SetReplicatedOnly(replicatedOnly);
634619
cfg.SetCollocated(collocated);
635-
cfg.SetLazy(lazy);
636620
cfg.SetSkipReducerOnUpdate(skipReducerOnUpdate);
637621
}
638622
}

modules/platforms/cpp/odbc/src/config/configuration.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ namespace ignite
4343
const bool Configuration::DefaultValue::enforceJoinOrder = false;
4444
const bool Configuration::DefaultValue::replicatedOnly = false;
4545
const bool Configuration::DefaultValue::collocated = false;
46-
const bool Configuration::DefaultValue::lazy = false;
4746
const bool Configuration::DefaultValue::skipReducerOnUpdate = false;
4847

4948
const ProtocolVersion& Configuration::DefaultValue::protocolVersion = ProtocolVersion::GetCurrent();
@@ -69,7 +68,6 @@ namespace ignite
6968
enforceJoinOrder(DefaultValue::enforceJoinOrder),
7069
replicatedOnly(DefaultValue::replicatedOnly),
7170
collocated(DefaultValue::collocated),
72-
lazy(DefaultValue::lazy),
7371
skipReducerOnUpdate(DefaultValue::skipReducerOnUpdate),
7472
protocolVersion(DefaultValue::protocolVersion),
7573
endPoints(std::vector<EndPoint>()),
@@ -322,21 +320,6 @@ namespace ignite
322320
return collocated.IsSet();
323321
}
324322

325-
bool Configuration::IsLazy() const
326-
{
327-
return lazy.GetValue();
328-
}
329-
330-
void Configuration::SetLazy(bool val)
331-
{
332-
this->lazy.SetValue(val);
333-
}
334-
335-
bool Configuration::IsLazySet() const
336-
{
337-
return lazy.IsSet();
338-
}
339-
340323
bool Configuration::IsSkipReducerOnUpdate() const
341324
{
342325
return skipReducerOnUpdate.GetValue();
@@ -438,7 +421,6 @@ namespace ignite
438421
AddToMap(res, ConnectionStringParser::Key::pageSize, pageSize);
439422
AddToMap(res, ConnectionStringParser::Key::replicatedOnly, replicatedOnly);
440423
AddToMap(res, ConnectionStringParser::Key::collocated, collocated);
441-
AddToMap(res, ConnectionStringParser::Key::lazy, lazy);
442424
AddToMap(res, ConnectionStringParser::Key::skipReducerOnUpdate, skipReducerOnUpdate);
443425
AddToMap(res, ConnectionStringParser::Key::sslMode, sslMode);
444426
AddToMap(res, ConnectionStringParser::Key::sslKeyFile, sslKeyFile);
@@ -513,4 +495,3 @@ namespace ignite
513495
}
514496
}
515497
}
516-

0 commit comments

Comments
 (0)