OmniSciDB  04ee39c94c
TopKTest.cpp File Reference
#include "../Import/Importer.h"
#include "../Parser/parser.h"
#include "../QueryEngine/ArrowResultSet.h"
#include "../QueryEngine/Descriptors/RelAlgExecutionDescriptor.h"
#include "../QueryEngine/Execute.h"
#include "../QueryRunner/QueryRunner.h"
#include "../SqliteConnector/SqliteConnector.h"
#include "TestHelpers.h"
#include <gtest/gtest.h>
#include <boost/algorithm/string.hpp>
#include <boost/program_options.hpp>
#include <sstream>
+ Include dependency graph for TopKTest.cpp:

Go to the source code of this file.

Classes

class  anonymous_namespace{TopKTest.cpp}::SQLiteComparator
 

Namespaces

 anonymous_namespace{TopKTest.cpp}
 

Macros

#define BASE_PATH   "./tmp"
 
#define SKIP_NO_GPU()
 

Typedefs

using QR = QueryRunner::QueryRunner
 

Functions

void anonymous_namespace{TopKTest.cpp}::run_ddl_statement (const std::string query_str)
 
std::shared_ptr< ResultSetanonymous_namespace{TopKTest.cpp}::run_multiple_agg (const string &query_str, const ExecutorDeviceType device_type, const bool allow_loop_joins)
 
std::shared_ptr< ResultSetanonymous_namespace{TopKTest.cpp}::run_multiple_agg (const string &query_str, const ExecutorDeviceType device_type)
 
template<class T >
anonymous_namespace{TopKTest.cpp}::v (const TargetValue &r)
 
bool anonymous_namespace{TopKTest.cpp}::skip_tests (const ExecutorDeviceType device_type)
 
bool anonymous_namespace{TopKTest.cpp}::approx_eq (const double v, const double target, const double eps=0.01)
 
void anonymous_namespace{TopKTest.cpp}::c (const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
 
int anonymous_namespace{TopKTest.cpp}::create_and_populate_tables ()
 
void anonymous_namespace{TopKTest.cpp}::drop_tables ()
 
 TEST (Select, TopK_LIMIT_AscendSort)
 
 TEST (Select, TopK_LIMIT_DescendSort)
 
 TEST (Select, TopK_LIMIT_GreaterThan_TotalOfDataRows_AscendSort)
 
 TEST (Select, TopK_LIMIT_GreaterThan_TotalOfDataRows_DescendSort)
 
 TEST (Select, TopK_LIMIT_OFFSET_TopHalf_AscendSort)
 
 TEST (Select, TopK_LIMIT_OFFSET_TopHalf_DescendSort)
 
 TEST (Select, DISABLED_TopK_LIMIT_OFFSET_BottomHalf_AscendSort)
 
 TEST (Select, DISABLED_TopK_LIMIT_OFFSET_BottomHalf_DescendSort)
 
 TEST (Select, DISABLED_TopK_LIMIT_OFFSET_GreaterThan_TotalOfDataRows_AscendSort)
 
 TEST (Select, DISABLED_TopK_LIMIT_OFFSET_GreaterThan_TotalOfDataRows_DescendSort)
 
 TEST (Select, DISABLED_TopK_LIMIT_OFFSET_DifferentOrders)
 
int main (int argc, char *argv[])
 

Variables

SQLiteComparator anonymous_namespace{TopKTest.cpp}::g_sqlite_comparator
 

Macro Definition Documentation

◆ BASE_PATH

#define BASE_PATH   "./tmp"

Definition at line 33 of file TopKTest.cpp.

Referenced by main().

◆ SKIP_NO_GPU

#define SKIP_NO_GPU ( )
Value:
if (skip_tests(dt)) { \
CHECK(dt == ExecutorDeviceType::GPU); \
LOG(WARNING) << "GPU not available, skipping GPU tests"; \
continue; \
}
bool skip_tests(const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:65

Definition at line 303 of file TopKTest.cpp.

Referenced by TEST().

Typedef Documentation

◆ QR

Definition at line 38 of file TopKTest.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 714 of file TopKTest.cpp.

References BASE_PATH, anonymous_namespace{TopKTest.cpp}::create_and_populate_tables(), drop_tables(), logger::ERROR, QueryRunner::QueryRunner::init(), TestHelpers::init_logger_stderr_only(), LOG, and QueryRunner::QueryRunner::reset().

714  {
716  ::testing::InitGoogleTest(&argc, argv);
717 
719 
720  int err{0};
722  if (err) {
723  return err;
724  }
725 
726  try {
727  err = RUN_ALL_TESTS();
728  } catch (const std::exception& e) {
729  LOG(ERROR) << e.what();
730  }
731 
732  drop_tables();
733  QR::reset();
734  return err;
735 }
#define LOG(tag)
Definition: Logger.h:182
static QueryRunner * init(const char *db_path, const std::string &udf_filename="", const size_t max_gpu_mem=0, const int reserved_gpu_mem=256<< 20)
Definition: QueryRunner.h:70
void drop_tables(std::string prefix, int max)
void init_logger_stderr_only(int argc, char const *const *argv)
Definition: TestHelpers.h:194
#define BASE_PATH
Definition: TopKTest.cpp:33
+ Here is the call graph for this function:

◆ TEST() [1/11]

TEST ( Select  ,
TopK_LIMIT_AscendSort   
)

Definition at line 380 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

380  {
382  SKIP_NO_GPU();
383  c("SELECT i FROM tdata ORDER BY i NULLS FIRST LIMIT 5;",
384  "SELECT i FROM tdata ORDER BY i ASC LIMIT 5;",
385  dt);
386  c("SELECT b FROM tdata ORDER BY b NULLS FIRST LIMIT 5;",
387  "SELECT b FROM tdata ORDER BY b LIMIT 5;",
388  dt);
389  c("SELECT bi FROM tdata ORDER BY bi NULLS FIRST LIMIT 5;",
390  "SELECT bi FROM tdata ORDER BY bi LIMIT 5;",
391  dt);
392  c("SELECT n FROM tdata ORDER BY n NULLS FIRST LIMIT 5;",
393  "SELECT n FROM tdata ORDER BY n LIMIT 5;",
394  dt);
395  c("SELECT f FROM tdata ORDER BY f NULLS FIRST LIMIT 5;",
396  "SELECT f FROM tdata ORDER BY f LIMIT 5;",
397  dt);
398  c("SELECT tt FROM tdata ORDER BY tt NULLS FIRST LIMIT 5;",
399  "SELECT tt FROM tdata ORDER BY tt LIMIT 5;",
400  dt);
401  c("SELECT ts FROM tdata ORDER BY ts NULLS FIRST LIMIT 5;",
402  "SELECT ts FROM tdata ORDER BY ts LIMIT 5;",
403  dt);
404  c("SELECT d FROM tdata ORDER BY d NULLS FIRST LIMIT 5;",
405  "SELECT d FROM tdata ORDER BY d LIMIT 5;",
406  dt);
407  }
408 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [2/11]

TEST ( Select  ,
TopK_LIMIT_DescendSort   
)

Definition at line 410 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

410  {
412  SKIP_NO_GPU();
413  c("SELECT i FROM tdata ORDER BY i DESC NULLS LAST LIMIT 5;",
414  "SELECT i FROM tdata ORDER BY i DESC LIMIT 5;",
415  dt);
416  c("SELECT b FROM tdata ORDER BY b DESC NULLS LAST LIMIT 5;",
417  "SELECT b FROM tdata ORDER BY b DESC LIMIT 5;",
418  dt);
419  c("SELECT bi FROM tdata ORDER BY bi DESC NULLS LAST LIMIT 5;",
420  "SELECT bi FROM tdata ORDER BY bi DESC LIMIT 5;",
421  dt);
422  c("SELECT n FROM tdata ORDER BY n DESC NULLS LAST LIMIT 5;",
423  "SELECT n FROM tdata ORDER BY n DESC LIMIT 5;",
424  dt);
425  c("SELECT f FROM tdata ORDER BY f DESC NULLS LAST LIMIT 5;",
426  "SELECT f FROM tdata ORDER BY f DESC LIMIT 5;",
427  dt);
428  c("SELECT tt FROM tdata ORDER BY tt DESC NULLS LAST LIMIT 5;",
429  "SELECT tt FROM tdata ORDER BY tt DESC LIMIT 5;",
430  dt);
431  c("SELECT ts FROM tdata ORDER BY ts DESC NULLS LAST LIMIT 5;",
432  "SELECT ts FROM tdata ORDER BY ts DESC LIMIT 5;",
433  dt);
434  c("SELECT d FROM tdata ORDER BY d DESC NULLS LAST LIMIT 5;",
435  "SELECT d FROM tdata ORDER BY d DESC LIMIT 5;",
436  dt);
437  }
438 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [3/11]

TEST ( Select  ,
TopK_LIMIT_GreaterThan_TotalOfDataRows_AscendSort   
)

Definition at line 440 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

440  {
442  SKIP_NO_GPU();
443  c("SELECT b FROM tdata ORDER BY b NULLS FIRST LIMIT 11;",
444  "SELECT b FROM tdata ORDER BY b LIMIT 11;",
445  dt);
446  c("SELECT bi FROM tdata ORDER BY bi NULLS FIRST LIMIT 11;",
447  "SELECT bi FROM tdata ORDER BY bi LIMIT 11;",
448  dt);
449  c("SELECT n FROM tdata ORDER BY n NULLS FIRST LIMIT 11;",
450  "SELECT n FROM tdata ORDER BY n LIMIT 11;",
451  dt);
452  c("SELECT f FROM tdata ORDER BY f NULLS FIRST LIMIT 11;",
453  "SELECT f FROM tdata ORDER BY f LIMIT 11;",
454  dt);
455  c("SELECT tt FROM tdata ORDER BY tt NULLS FIRST LIMIT 11;",
456  "SELECT tt FROM tdata ORDER BY tt LIMIT 11;",
457  dt);
458  c("SELECT ts FROM tdata ORDER BY ts NULLS FIRST LIMIT 11;",
459  "SELECT ts FROM tdata ORDER BY ts LIMIT 11;",
460  dt);
461  c("SELECT d FROM tdata ORDER BY d NULLS FIRST LIMIT 11;",
462  "SELECT d FROM tdata ORDER BY d LIMIT 11;",
463  dt);
464  }
465 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [4/11]

TEST ( Select  ,
TopK_LIMIT_GreaterThan_TotalOfDataRows_DescendSort   
)

Definition at line 467 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

467  {
469  SKIP_NO_GPU();
470  c("SELECT i FROM tdata ORDER BY i DESC NULLS LAST LIMIT 11;",
471  "SELECT i FROM tdata ORDER BY i DESC LIMIT 11;",
472  dt);
473  c("SELECT b FROM tdata ORDER BY b DESC NULLS LAST LIMIT 11;",
474  "SELECT b FROM tdata ORDER BY b DESC LIMIT 11;",
475  dt);
476  c("SELECT bi FROM tdata ORDER BY bi DESC NULLS LAST LIMIT 11;",
477  "SELECT bi FROM tdata ORDER BY bi DESC LIMIT 11;",
478  dt);
479  c("SELECT n FROM tdata ORDER BY n DESC NULLS LAST LIMIT 11;",
480  "SELECT n FROM tdata ORDER BY n DESC LIMIT 11;",
481  dt);
482  c("SELECT f FROM tdata ORDER BY f DESC NULLS LAST LIMIT 11;",
483  "SELECT f FROM tdata ORDER BY f DESC LIMIT 11;",
484  dt);
485  c("SELECT tt FROM tdata ORDER BY tt DESC NULLS LAST LIMIT 11;",
486  "SELECT tt FROM tdata ORDER BY tt DESC LIMIT 11;",
487  dt);
488  c("SELECT ts FROM tdata ORDER BY ts DESC NULLS LAST LIMIT 11;",
489  "SELECT ts FROM tdata ORDER BY ts DESC LIMIT 11;",
490  dt);
491  c("SELECT d FROM tdata ORDER BY d DESC NULLS LAST LIMIT 11;",
492  "SELECT d FROM tdata ORDER BY d DESC LIMIT 11;",
493  dt);
494  }
495 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [5/11]

TEST ( Select  ,
TopK_LIMIT_OFFSET_TopHalf_AscendSort   
)

Definition at line 497 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

497  {
499  SKIP_NO_GPU();
500  c("SELECT i FROM tdata ORDER BY i NULLS FIRST LIMIT 5 OFFSET 0;",
501  "SELECT i FROM tdata ORDER BY i LIMIT 5 OFFSET 0;",
502  dt);
503  c("SELECT b FROM tdata ORDER BY b NULLS FIRST LIMIT 5 OFFSET 0;",
504  "SELECT b FROM tdata ORDER BY b LIMIT 5 OFFSET 0;",
505  dt);
506  c("SELECT bi FROM tdata ORDER BY bi NULLS FIRST LIMIT 5 OFFSET 0;",
507  "SELECT bi FROM tdata ORDER BY bi LIMIT 5 OFFSET 0;",
508  dt);
509  c("SELECT n FROM tdata ORDER BY n NULLS FIRST LIMIT 5 OFFSET 0;",
510  "SELECT n FROM tdata ORDER BY n LIMIT 5 OFFSET 0;",
511  dt);
512  c("SELECT f FROM tdata ORDER BY f NULLS FIRST LIMIT 5 OFFSET 0;",
513  "SELECT f FROM tdata ORDER BY f LIMIT 5 OFFSET 0;",
514  dt);
515  c("SELECT tt FROM tdata ORDER BY tt NULLS FIRST LIMIT 5 OFFSET 0;",
516  "SELECT tt FROM tdata ORDER BY tt LIMIT 5 OFFSET 0;",
517  dt);
518  c("SELECT ts FROM tdata ORDER BY ts NULLS FIRST LIMIT 5 OFFSET 0;",
519  "SELECT ts FROM tdata ORDER BY ts LIMIT 5 OFFSET 0;",
520  dt);
521  c("SELECT d FROM tdata ORDER BY d NULLS FIRST LIMIT 5 OFFSET 0;",
522  "SELECT d FROM tdata ORDER BY d LIMIT 5 OFFSET 0;",
523  dt);
524  }
525 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [6/11]

TEST ( Select  ,
TopK_LIMIT_OFFSET_TopHalf_DescendSort   
)

Definition at line 527 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

527  {
529  SKIP_NO_GPU();
530  c("SELECT i FROM tdata ORDER BY i DESC NULLS LAST LIMIT 5 OFFSET 0;",
531  "SELECT i FROM tdata ORDER BY i DESC LIMIT 5 OFFSET 0;",
532  dt);
533  c("SELECT b FROM tdata ORDER BY b DESC NULLS LAST LIMIT 5 OFFSET 0;",
534  "SELECT b FROM tdata ORDER BY b DESC LIMIT 5 OFFSET 0;",
535  dt);
536  c("SELECT bi FROM tdata ORDER BY bi DESC NULLS LAST LIMIT 5 OFFSET 0;",
537  "SELECT bi FROM tdata ORDER BY bi DESC LIMIT 5 OFFSET 0;",
538  dt);
539  c("SELECT n FROM tdata ORDER BY n DESC NULLS LAST LIMIT 5 OFFSET 0;",
540  "SELECT n FROM tdata ORDER BY n DESC LIMIT 5 OFFSET 0;",
541  dt);
542  c("SELECT f FROM tdata ORDER BY f DESC NULLS LAST LIMIT 5 OFFSET 0;",
543  "SELECT f FROM tdata ORDER BY f DESC LIMIT 5 OFFSET 0;",
544  dt);
545  c("SELECT tt FROM tdata ORDER BY tt DESC NULLS LAST LIMIT 5 OFFSET 0;",
546  "SELECT tt FROM tdata ORDER BY tt DESC LIMIT 5 OFFSET 0;",
547  dt);
548  c("SELECT ts FROM tdata ORDER BY ts DESC NULLS LAST LIMIT 5 OFFSET 0;",
549  "SELECT ts FROM tdata ORDER BY ts DESC LIMIT 5 OFFSET 0;",
550  dt);
551  c("SELECT d FROM tdata ORDER BY d DESC NULLS LAST LIMIT 5 OFFSET 0;",
552  "SELECT d FROM tdata ORDER BY d DESC LIMIT 5 OFFSET 0;xxx",
553  dt);
554  }
555 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [7/11]

TEST ( Select  ,
DISABLED_TopK_LIMIT_OFFSET_BottomHalf_AscendSort   
)

Definition at line 557 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

557  {
559  SKIP_NO_GPU();
560  c("SELECT i FROM tdata ORDER BY i NULLS FIRST LIMIT 5 OFFSET 5;",
561  "SELECT i FROM tdata ORDER BY i LIMIT 5 OFFSET 5;",
562  dt);
563  c("SELECT b FROM tdata ORDER BY b NULLS FIRST LIMIT 5 OFFSET 5;",
564  "SELECT b FROM tdata ORDER BY b LIMIT 5 OFFSET 5;",
565  dt);
566  c("SELECT bi FROM tdata ORDER BY bi NULLS FIRST LIMIT 5 OFFSET 5;",
567  "SELECT bi FROM tdata ORDER BY bi LIMIT 5 OFFSET 5;",
568  dt);
569  c("SELECT n FROM tdata ORDER BY n NULLS FIRST LIMIT 5 OFFSET 5;",
570  "SELECT n FROM tdata ORDER BY n LIMIT 5 OFFSET 5;",
571  dt);
572  c("SELECT f FROM tdata ORDER BY f NULLS FIRST LIMIT 5 OFFSET 5;",
573  "SELECT f FROM tdata ORDER BY f LIMIT 5 OFFSET 5;",
574  dt);
575  c("SELECT tt FROM tdata ORDER BY tt NULLS FIRST LIMIT 5 OFFSET 5;",
576  "SELECT tt FROM tdata ORDER BY tt LIMIT 5 OFFSET 5;",
577  dt);
578  c("SELECT ts FROM tdata ORDER BY ts NULLS FIRST LIMIT 5 OFFSET 5;",
579  "SELECT ts FROM tdata ORDER BY ts LIMIT 5 OFFSET 5;",
580  dt);
581  c("SELECT d FROM tdata ORDER BY d NULLS FIRST LIMIT 5 OFFSET 5;",
582  "SELECT d FROM tdata ORDER BY d LIMIT 5 OFFSET 5;",
583  dt);
584  }
585 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [8/11]

TEST ( Select  ,
DISABLED_TopK_LIMIT_OFFSET_BottomHalf_DescendSort   
)

Definition at line 587 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

587  {
589  SKIP_NO_GPU();
590  c("SELECT i FROM tdata ORDER BY i DESC NULLS LAST LIMIT 5 OFFSET 5;",
591  "SELECT i FROM tdata ORDER BY i DESC LIMIT 5 OFFSET 5;",
592  dt);
593  c("SELECT b FROM tdata ORDER BY b DESC NULLS LAST LIMIT 5 OFFSET 5;",
594  "SELECT b FROM tdata ORDER BY b DESC LIMIT 5 OFFSET 5;",
595  dt);
596  c("SELECT bi FROM tdata ORDER BY bi DESC NULLS LAST LIMIT 5 OFFSET 5;",
597  "SELECT bi FROM tdata ORDER BY bi DESC LIMIT 5 OFFSET 5;",
598  dt);
599  c("SELECT n FROM tdata ORDER BY n DESC NULLS LAST LIMIT 5 OFFSET 5;",
600  "SELECT n FROM tdata ORDER BY n DESC LIMIT 5 OFFSET 5;",
601  dt);
602  c("SELECT f FROM tdata ORDER BY f DESC NULLS LAST LIMIT 5 OFFSET 5;",
603  "SELECT f FROM tdata ORDER BY f DESC LIMIT 5 OFFSET 5;",
604  dt);
605  c("SELECT tt FROM tdata ORDER BY tt DESC NULLS LAST LIMIT 5 OFFSET 5;",
606  "SELECT tt FROM tdata ORDER BY tt DESC LIMIT 5 OFFSET 5;",
607  dt);
608  c("SELECT ts FROM tdata ORDER BY ts DESC NULLS LAST LIMIT 5 OFFSET 5;",
609  "SELECT ts FROM tdata ORDER BY ts DESC LIMIT 5 OFFSET 5;",
610  dt);
611  c("SELECT d FROM tdata ORDER BY d DESC NULLS LAST LIMIT 5 OFFSET 5;",
612  "SELECT d FROM tdata ORDER BY d DESC LIMIT 5 OFFSET 5;",
613  dt);
614  }
615 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [9/11]

TEST ( Select  ,
DISABLED_TopK_LIMIT_OFFSET_GreaterThan_TotalOfDataRows_AscendSort   
)

Definition at line 617 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

617  {
619  SKIP_NO_GPU();
620  c("SELECT i FROM tdata ORDER BY i NULLS FIRST LIMIT 5 OFFSET 11;",
621  "SELECT i FROM tdata ORDER BY i LIMIT 5 OFFSET 11;",
622  dt);
623  c("SELECT b FROM tdata ORDER BY b NULLS FIRST LIMIT 5 OFFSET 11;",
624  "SELECT b FROM tdata ORDER BY b LIMIT 5 OFFSET 11;",
625  dt);
626  c("SELECT bi FROM tdata ORDER BY bi NULLS FIRST LIMIT 5 OFFSET 11;",
627  "SELECT bi FROM tdata ORDER BY bi LIMIT 5 OFFSET 11;",
628  dt);
629  c("SELECT n FROM tdata ORDER BY n NULLS FIRST LIMIT 5 OFFSET 11;",
630  "SELECT n FROM tdata ORDER BY n LIMIT 5 OFFSET 11;",
631  dt);
632  c("SELECT f FROM tdata ORDER BY f NULLS FIRST LIMIT 5 OFFSET 11;",
633  "SELECT f FROM tdata ORDER BY f LIMIT 5 OFFSET 11;",
634  dt);
635  c("SELECT tt FROM tdata ORDER BY tt NULLS FIRST LIMIT 5 OFFSET 11;",
636  "SELECT tt FROM tdata ORDER BY tt LIMIT 5 OFFSET 11;",
637  dt);
638  c("SELECT ts FROM tdata ORDER BY ts NULLS FIRST LIMIT 5 OFFSET 11;",
639  "SELECT ts FROM tdata ORDER BY ts LIMIT 5 OFFSET 11;",
640  dt);
641  c("SELECT d FROM tdata ORDER BY d NULLS FIRST LIMIT 5 OFFSET 11;",
642  "SELECT d FROM tdata ORDER BY d LIMIT 5 OFFSET 11;",
643  dt);
644  }
645 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [10/11]

TEST ( Select  ,
DISABLED_TopK_LIMIT_OFFSET_GreaterThan_TotalOfDataRows_DescendSort   
)

Definition at line 647 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

647  {
649  SKIP_NO_GPU();
650  c("SELECT i FROM tdata ORDER BY i DESC NULLS LAST LIMIT 5 OFFSET 11;",
651  "SELECT i FROM tdata ORDER BY i DESC LIMIT 5 OFFSET 11;",
652  dt);
653  c("SELECT b FROM tdata ORDER BY b DESC NULLS LAST LIMIT 5 OFFSET 11;",
654  "SELECT b FROM tdata ORDER BY b DESC LIMIT 5 OFFSET 11;",
655  dt);
656  c("SELECT bi FROM tdata ORDER BY bi DESC NULLS LAST LIMIT 5 OFFSET 11;",
657  "SELECT bi FROM tdata ORDER BY bi DESC LIMIT 5 OFFSET 11;",
658  dt);
659  c("SELECT n FROM tdata ORDER BY n DESC NULLS LAST LIMIT 5 OFFSET 11;",
660  "SELECT n FROM tdata ORDER BY n DESC LIMIT 5 OFFSET 11;",
661  dt);
662  c("SELECT f FROM tdata ORDER BY f DESC NULLS LAST LIMIT 5 OFFSET 11;",
663  "SELECT f FROM tdata ORDER BY f DESC LIMIT 5 OFFSET 11;",
664  dt);
665  c("SELECT tt FROM tdata ORDER BY tt DESC NULLS LAST LIMIT 5 OFFSET 11;",
666  "SELECT tt FROM tdata ORDER BY tt DESC LIMIT 5 OFFSET 11;",
667  dt);
668  c("SELECT ts FROM tdata ORDER BY ts DESC NULLS LAST LIMIT 5 OFFSET 11;",
669  "SELECT ts FROM tdata ORDER BY ts DESC LIMIT 5 OFFSET 11;",
670  dt);
671  c("SELECT d FROM tdata ORDER BY d DESC NULLS LAST LIMIT 5 OFFSET 11;",
672  "SELECT d FROM tdata ORDER BY d DESC LIMIT 5 OFFSET 11;",
673  dt);
674  }
675 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function:

◆ TEST() [11/11]

TEST ( Select  ,
DISABLED_TopK_LIMIT_OFFSET_DifferentOrders   
)

Definition at line 677 of file TopKTest.cpp.

References anonymous_namespace{TopKTest.cpp}::c(), CPU, GPU, and SKIP_NO_GPU.

677  {
679  SKIP_NO_GPU();
680  c("SELECT i,d FROM tdata ORDER BY d DESC NULLS LAST LIMIT 5 OFFSET 11;",
681  "SELECT i,d FROM tdata ORDER BY d DESC LIMIT 5 OFFSET 11;",
682  dt);
683  c("SELECT i,d FROM tdata ORDER BY i DESC NULLS LAST LIMIT 5 OFFSET 11;",
684  "SELECT i,d FROM tdata ORDER BY i DESC LIMIT 5 OFFSET 11;",
685  dt);
686  c("SELECT i,d FROM tdata ORDER BY i,d DESC NULLS LAST LIMIT 5 OFFSET 11;",
687  "SELECT i,d FROM tdata ORDER BY i,d DESC LIMIT 5 OFFSET 11;",
688  dt);
689  c("SELECT d FROM tdata ORDER BY i DESC NULLS LAST LIMIT 5 OFFSET 11;",
690  "SELECT d FROM tdata ORDER BY i DESC LIMIT 5 OFFSET 11;",
691  dt);
692  c("SELECT d FROM tdata ORDER BY i,d DESC NULLS LAST LIMIT 5 OFFSET 11;",
693  "SELECT d FROM tdata ORDER BY i,d DESC LIMIT 5 OFFSET 11;",
694  dt);
695 
696  c("SELECT i,d FROM tdata ORDER BY d NULLS FIRST LIMIT 5 OFFSET 11;",
697  "SELECT i,d FROM tdata ORDER BY d LIMIT 5 OFFSET 11;",
698  dt);
699  c("SELECT i,d FROM tdata ORDER BY i NULLS FIRST LIMIT 5 OFFSET 11;",
700  "SELECT i,d FROM tdata ORDER BY i LIMIT 5 OFFSET 11;",
701  dt);
702  c("SELECT i,d FROM tdata ORDER BY i,d NULLS FIRST LIMIT 5 OFFSET 11;",
703  "SELECT i,d FROM tdata ORDER BY i,d LIMIT 5 OFFSET 11;",
704  dt);
705  c("SELECT d FROM tdata ORDER BY i NULLS FIRST LIMIT 5 OFFSET 11;",
706  "SELECT d FROM tdata ORDER BY i LIMIT 5 OFFSET 11;",
707  dt);
708  c("SELECT d FROM tdata ORDER BY i,d NULLS FIRST LIMIT 5 OFFSET 11;",
709  "SELECT d FROM tdata ORDER BY i,d LIMIT 5 OFFSET 11;",
710  dt);
711  }
712 }
#define SKIP_NO_GPU()
Definition: TopKTest.cpp:303
void c(const std::string &query_string, const std::string &sqlite_query_string, const ExecutorDeviceType device_type)
Definition: TopKTest.cpp:296
+ Here is the call graph for this function: