~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/nested_join.h

  • Committer: devananda
  • Date: 2009-07-01 17:38:47 UTC
  • mto: (1093.1.7 captain)
  • mto: This revision was merged to the branch mainline in revision 1095.
  • Revision ID: devananda.vdv@gmail.com-20090701173847-3n3mbtessg5ff35e
refactored function/benchmark into plugin/benchmark

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define DRIZZLED_NESTED_JOIN_H
22
22
 
23
23
#include <drizzled/sql_list.h>
 
24
#include <drizzled/sql_bitmap.h>
24
25
#include <drizzled/item.h>
25
26
#include <drizzled/table_list.h>
26
27
 
27
 
#include <bitset>
28
 
 
29
 
namespace drizzled
30
 
{
31
 
 
32
28
struct nested_join_st
33
29
{
34
30
  /* list of elements in the nested join */
41
37
  table_map not_null_tables;
42
38
 
43
39
  /* the first nested table in the plan  */
44
 
  JoinTable *first_nested;
 
40
  struct st_join_table *first_nested;
45
41
 
46
42
  /*
47
43
    Used to count tables in the nested join in 2 isolated places:
53
49
  uint32_t counter_;
54
50
 
55
51
  /* Bit used to identify this nested join*/
56
 
  std::bitset<64> nj_map;
 
52
  nested_join_map nj_map;
57
53
 
58
54
  /*
59
55
    (Valid only for semi-join nests) Bitmap of tables outside the semi-join
64
60
  table_map sj_corr_tables;
65
61
 
66
62
  List<Item> sj_outer_expr_list;
67
 
 
68
 
  /**
69
 
     True if this join nest node is completely covered by the query execution
70
 
     plan. This means two things.
71
 
 
72
 
     1. All tables on its @c join_list are covered by the plan.
73
 
 
74
 
     2. All child join nest nodes are fully covered.
75
 
   */
76
 
  bool is_fully_covered() const { return join_list.elements == counter_; }
77
63
};
78
64
 
79
 
} /* namespace drizzled */
80
 
 
81
65
#endif /* DRIZZLED_NESTED_JOIN_H */