hipster_sql_to_hbase 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21aa3a9f2162b1887138ca8e123895d18a474c58
4
- data.tar.gz: c7a905d57e231b9368d389fb59632d45c450676b
3
+ metadata.gz: 1583e88aaf6c60a66733fe927e0b23cbc1212131
4
+ data.tar.gz: b12dc40939b1f1ba3946f6f34fd6b81298510907
5
5
  SHA512:
6
- metadata.gz: a3e3a61c3eeb144623e2d8e1681413ddaf875b4fa5f8ad7f3e5ec1bcfa6aa286e40ea064039056ffda8a0f4376bdc8548ef48287ba94a45b5aa2fb35b765af96
7
- data.tar.gz: ec656c0165aefa7f856541246e9133b7e8f7ae62b2f41d5fba2dfac1489da1a9fc46b3de88b99a1cb2270239ba1307c48aad4f82d42f5ce2a39c3385ff4dfbe7
6
+ metadata.gz: 8a7f6babe8a3b23b6d732a61a349dc2c4e63cae89d836b122e2d58a2a9bcc744e0b1f381dbd5c3e425710183691038adf46b4dacba220e311dbd0abf1eed4875
7
+ data.tar.gz: 3f24fa78d1124120133e8524fe038750933553120b181f2dd7b4c97fe7e223c7ea02b020042c9155500b3e26e171749618f51233db3a8910282613d949699c46
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "hipster_sql_to_hbase"
5
- s.version = "0.1.7"
5
+ s.version = "0.1.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jean Lescure"]
@@ -47,9 +47,7 @@ module HipsterSqlToHbase
47
47
  # as to be executed as a Thrift method.
48
48
  class ResultTree < Hash
49
49
  def initialize(hash)
50
- hash.each do |k,v|
51
- self[k] = v
52
- end
50
+ hash.each { |k,v| self[k] = v }
53
51
  end
54
52
 
55
53
  # Transforms itself into an HBase (Thrift) method.
@@ -7,6 +7,7 @@ grammar SQL
7
7
  include SQLInsert
8
8
  include SQLShowTables
9
9
  include SQLCreateTable
10
+ include SQLCreateIndex
10
11
 
11
12
  rule sql_statement
12
13
  select_expression /
@@ -16,6 +17,7 @@ grammar SQL
16
17
  transaction_statement /
17
18
  insert /
18
19
  show_tables /
19
- create_table
20
+ create_table /
21
+ create_index
20
22
  end
21
23
  end
@@ -0,0 +1,34 @@
1
+ grammar SQLCreateIndex
2
+ include SQLRowSupport
3
+
4
+ rule create_index
5
+ "CREATE" optional_unique SPACES "INDEX" SPACES
6
+ index_name SPACES "ON" SPACES
7
+ table_name optional_spaces OPEN_PARENS optional_spaces column_name optional_spaces CLOSE_PARENS {
8
+ def query_type
9
+ :create_index
10
+ end
11
+ def tree
12
+ {
13
+ :index => index_name.eval,
14
+ :table => table_name.eval,
15
+ :column => column_name.eval
16
+ }
17
+ end
18
+ }
19
+ end
20
+
21
+ rule optional_unique
22
+ SPACES "UNIQUE" {
23
+ def eval
24
+ true
25
+ end
26
+ }
27
+ /
28
+ EMPTY_STRING {
29
+ def eval
30
+ false
31
+ end
32
+ }
33
+ end
34
+ end
@@ -3,7 +3,9 @@ grammar SQLCreateTable
3
3
  include SQLDataTypes
4
4
 
5
5
  rule create_table
6
- "CREATE" SPACE+ "TABLE" SPACE+ table_name SPACE+ OPEN_PARENS columns_and_datatypes CLOSE_PARENS {
6
+ "CREATE" SPACES "TABLE" SPACES
7
+ table_name SPACES OPEN_PARENS columns_and_datatypes CLOSE_PARENS
8
+ optional_engine {
7
9
  def eval
8
10
  options = {
9
11
  :columns => columns_and_datatypes.eval,
@@ -38,10 +40,44 @@ grammar SQLCreateTable
38
40
  end
39
41
 
40
42
  rule column_with_datatype
41
- SPACE* column_name SPACE+ datatype SPACE* {
43
+ optional_spaces column_name SPACES datatype optional_column_features? optional_spaces {
42
44
  def eval
43
45
  [column_name.eval]
44
46
  end
45
47
  }
46
48
  end
49
+
50
+ rule optional_column_features
51
+ optional_column_feature optional_column_feature
52
+ /
53
+ optional_column_feature
54
+ end
55
+
56
+ rule optional_column_feature
57
+ optional_primary_key /
58
+ optional_auto_increment /
59
+ optional_not_null
60
+ end
61
+
62
+ rule optional_primary_key
63
+ SPACES "PRIMARY" SPACES "KEY"
64
+ /
65
+ SPACES "primary" SPACES "key"
66
+ end
67
+
68
+ rule optional_auto_increment
69
+ SPACES "AUTO_INCREMENT"
70
+ /
71
+ SPACES "auto_increment"
72
+ end
73
+
74
+ rule optional_not_null
75
+ SPACES (NOT_KEYWORD SPACES)? NULL_KEYWORD
76
+ end
77
+
78
+ rule optional_engine
79
+ SPACES "ENGINE=InnoDB"
80
+ /
81
+ EMPTY_STRING
82
+ end
47
83
  end
@@ -4,7 +4,12 @@ grammar SQLDataTypes
4
4
  rule datatype
5
5
  bit_field /
6
6
  numeric_type /
7
- char_type
7
+ char_type /
8
+ date_type
9
+ end
10
+
11
+ rule date_type
12
+ DATETIME_KEYWORD
8
13
  end
9
14
 
10
15
  rule char_type
@@ -3,24 +3,29 @@ grammar DropTable
3
3
  include SQLRowSupport
4
4
 
5
5
  rule drop_table
6
- "DROP" (temporary)? SPACE "TABLE" SPACE
6
+ "DROP" (temporary)? SPACES "TABLE" SPACES
7
7
  table_name
8
8
  (restrict / cascade)? {
9
- def eval
10
- DataStore.drop_table(table_name.eval.to_sym)
9
+ def query_type
10
+ :drop_table
11
+ end
12
+ def tree
13
+ {
14
+ :table => table_name.eval
15
+ }
11
16
  end
12
17
  }
13
18
  end
14
19
 
15
20
  rule temporary
16
- SPACE "TEMPORARY"
21
+ SPACES "TEMPORARY"
17
22
  end
18
23
 
19
24
  rule restrict
20
- SPACE "RESTRICT"
25
+ SPACES "RESTRICT"
21
26
  end
22
27
 
23
28
  rule cascade
24
- SPACE "CASCADE"
29
+ SPACES "CASCADE"
25
30
  end
26
31
  end
@@ -3,7 +3,7 @@ grammar SQLFromClause
3
3
  include SQLRowSupport
4
4
 
5
5
  rule from
6
- "FROM" SPACE one_or_more_table_names {
6
+ "FROM" SPACES one_or_more_table_names {
7
7
  def tables
8
8
  one_or_more_table_names.eval
9
9
  end
@@ -1,6 +1,53 @@
1
1
  grammar SQLHelpers
2
+
3
+ rule where_tree
4
+ where_condition_or_empty {
5
+ def eval
6
+ init_clause = where_condition.where_clause rescue false
7
+
8
+ (init_clause) ? build_where_tree(init_clause) : nil
9
+ end
10
+ def build_where_tree(init_clause)
11
+ clauses = []
12
+ clause = init_clause
13
+ while clause
14
+ parens = clause.OPEN_PARENS rescue false
15
+ if parens
16
+ clauses << build_where_tree(clause.where_clause)
17
+ break
18
+ end
19
+
20
+ clause_obj = false
21
+ begin
22
+ clause_obj = clause.clause1
23
+ rescue
24
+ clause_obj = clause if clause.one_column_name rescue false
25
+ end
26
+ if clause_obj
27
+ clauses << {
28
+ :column => clause_obj.one_column_name.eval,
29
+ :condition => clause_obj.joiner_or_null.condition_joiner.eval,
30
+ :value => clause_obj.joiner_or_null.primitive.eval
31
+ }
32
+
33
+ dc_joiner = clause.disjunction_or_conjunction_joiner.text_value rescue dc_joiner = false
34
+ clauses << dc_joiner if dc_joiner
35
+
36
+ clause = clause.clause2 rescue false
37
+ if !clause
38
+ clause = clause.where_clause rescue false
39
+ end
40
+ else
41
+ clause = clause.where_clause rescue false
42
+ end
43
+ end
44
+ clauses
45
+ end
46
+ }
47
+ end
48
+
2
49
  rule where_condition_or_empty
3
- SPACE where_condition {
50
+ SPACES where_condition {
4
51
  def eval
5
52
  where_condition.eval
6
53
  end
@@ -4,9 +4,9 @@ grammar SQLInsert
4
4
  include SQLHelpers
5
5
 
6
6
  rule insert
7
- "INSERT" SPACE ((low_priority / delayed / high_priority) SPACE)? (ignore SPACE)?
8
- ("INTO" SPACE)? table_name SPACE? optional_list_of_columns
9
- ("VALUES" / "VALUE") SPACE* groups_of_values {
7
+ "INSERT" SPACES ((low_priority / delayed / high_priority) SPACES)? (ignore SPACES)?
8
+ ("INTO" SPACES)? table_name SPACES optional_list_of_columns
9
+ ("VALUES" / "VALUE") optional_spaces groups_of_values {
10
10
  def query_type
11
11
  :insert
12
12
  end
@@ -41,7 +41,7 @@ grammar SQLInsert
41
41
  end
42
42
 
43
43
  rule optional_list_of_columns
44
- list_of_columns SPACE {
44
+ list_of_columns SPACES {
45
45
  def eval; list_of_columns.eval; end
46
46
  }
47
47
  /
@@ -67,19 +67,19 @@ grammar SQLInsert
67
67
  end
68
68
 
69
69
  rule list_of_columns
70
- "(" SPACE? one_or_more_column_names SPACE? ")" {
70
+ "(" optional_spaces one_or_more_column_names optional_spaces ")" {
71
71
  def eval; one_or_more_column_names.eval; end
72
72
  }
73
73
  end
74
74
 
75
75
  rule groups_of_values
76
- OPEN_PARENS SPACE* list_of_values SPACE* CLOSE_PARENS SPACE* "," SPACE* groups_of_values {
76
+ OPEN_PARENS optional_spaces list_of_values optional_spaces CLOSE_PARENS optional_spaces "," optional_spaces groups_of_values {
77
77
  def eval
78
78
  [list_of_values.eval] + groups_of_values.eval
79
79
  end
80
80
  }
81
81
  /
82
- OPEN_PARENS SPACE* list_of_values SPACE* CLOSE_PARENS {
82
+ OPEN_PARENS optional_spaces list_of_values optional_spaces CLOSE_PARENS {
83
83
  def eval
84
84
  [list_of_values.eval]
85
85
  end
@@ -93,7 +93,7 @@ grammar SQLInsert
93
93
  end
94
94
 
95
95
  rule one_or_more_values
96
- insert_value SPACE? "," SPACE? one_or_more_values {
96
+ insert_value optional_spaces "," optional_spaces one_or_more_values {
97
97
  def eval
98
98
  [insert_value.eval, one_or_more_values.eval].flatten
99
99
  end
@@ -111,7 +111,7 @@ grammar SQLInsert
111
111
  end
112
112
 
113
113
  rule default_value
114
- "DEFAULT" SPACE* OPEN_PARENS SPACE* column_name SPACE* CLOSE_PARENS {
114
+ "DEFAULT" optional_spaces OPEN_PARENS optional_spaces column_name optional_spaces CLOSE_PARENS {
115
115
  def eval; "DEFAULT"; end
116
116
  }
117
117
  end
@@ -2,6 +2,6 @@ grammar SQLLimit
2
2
  include SQLPrimitives
3
3
 
4
4
  rule limit
5
- "LIMIT" SPACE integer { def eval; integer.eval; end }
5
+ "LIMIT" SPACES integer { def eval; integer.eval; end }
6
6
  end
7
7
  end
@@ -46,6 +46,10 @@ grammar SQLRowSupport
46
46
  rule column_name
47
47
  backtick_string / column_string / all_columns
48
48
  end
49
+
50
+ rule index_name
51
+ column_name
52
+ end
49
53
 
50
54
  # TODO: Clean this up
51
55
  rule table_name
@@ -11,7 +11,7 @@ grammar SQLSelect
11
11
  rule select_expression
12
12
  select
13
13
  from
14
- where_condition_or_empty
14
+ where_tree
15
15
  limit_condition_or_empty
16
16
  order_by_condition_or_empty
17
17
  {
@@ -21,58 +21,21 @@ grammar SQLSelect
21
21
 
22
22
  :select => select.eval,
23
23
  :from => from.eval,
24
- :where => where_condition_or_empty.eval,
24
+ :where => where_tree.where_condition_or_empty.eval,
25
25
  :limit => limit_condition_or_empty.eval,
26
26
  :order_by => order_by_condition_or_empty.eval
27
27
  })
28
28
  end
29
+
29
30
  def query_type
30
31
  :select
31
32
  end
32
- def build_tree(init_clause)
33
- clauses = []
34
- clause = init_clause
35
- while clause
36
- parens = clause.OPEN_PARENS rescue false
37
- if parens
38
- clauses << build_tree(clause.where_clause)
39
- break
40
- end
41
-
42
- clause_obj = false
43
- begin
44
- clause_obj = clause.clause1
45
- rescue
46
- clause_obj = clause if clause.one_column_name rescue false
47
- end
48
- if clause_obj
49
- clauses << {
50
- :column => clause_obj.one_column_name.eval,
51
- :condition => clause_obj.joiner_or_null.condition_joiner.eval,
52
- :value => clause_obj.joiner_or_null.primitive.eval
53
- }
54
-
55
- dc_joiner = clause.disjunction_or_conjunction_joiner.text_value rescue dc_joiner = false
56
- clauses << dc_joiner if dc_joiner
57
-
58
- clause = clause.clause2 rescue false
59
- if !clause
60
- clause = clause.where_clause rescue false
61
- end
62
- else
63
- clause = clause.where_clause rescue false
64
- end
65
- end
66
- clauses
67
- end
33
+
68
34
  def tree
69
- init_clause = self.where_condition_or_empty.where_condition.where_clause rescue false
70
-
71
- where_result = (init_clause) ? build_tree(init_clause) : nil
72
35
  {
73
36
  :select => select.columns,
74
37
  :from => from.tables,
75
- :where => where_result,
38
+ :where => where_tree.eval,
76
39
  :limit => limit_condition_or_empty.eval,
77
40
  :order_by => order_by_condition_or_empty.eval
78
41
  }
@@ -3,7 +3,7 @@ grammar SQLSelectClause
3
3
  include SQLRowSupport
4
4
 
5
5
  rule select
6
- "SELECT" SPACE one_or_more_column_names optional_spaces {
6
+ "SELECT" SPACES one_or_more_column_names optional_spaces {
7
7
  def columns
8
8
  result = one_or_more_column_names.eval
9
9
  if result.kind_of?(Array)
@@ -4,23 +4,109 @@ grammar SQLShowTables
4
4
  include SQLWhereCondition
5
5
 
6
6
  rule show_tables
7
- "SHOW" SPACE (full)? "TABLES" from_table?
8
- (like_pattern / (SPACE where_condition))? {
7
+ "SHOW" SPACES optional_full
8
+ tables_or_fields
9
+ optional_from_table
10
+ optional_like_or_where {
11
+ def query_type
12
+ :show
13
+ end
14
+
15
+ def tree
16
+ like_where = optional_like_or_where.eval
17
+ {
18
+ :show => tables_or_fields.eval,
19
+ :full => optional_full.eval,
20
+ :from => optional_from_table.eval,
21
+ :like => like_where[:like],
22
+ :where => like_where[:where]
23
+ }
24
+ end
25
+ }
26
+ end
27
+
28
+ rule tables_or_fields
29
+ "TABLES" {
30
+ def eval
31
+ "tables"
32
+ end
33
+ }
34
+ /
35
+ "FIELDS" {
36
+ def eval
37
+ "fields"
38
+ end
39
+ }
40
+ /
41
+ "KEYS" {
9
42
  def eval
10
- Expressions::TableDisplayer.new(Guillotine::DataStore)
43
+ "keys"
44
+ end
45
+ }
46
+ end
47
+
48
+ rule optional_like_or_where
49
+ EMPTY_STRING like_pattern {
50
+ def eval
51
+ {
52
+ :like => like_pattern.eval,
53
+ :where => nil
54
+ }
55
+ end
56
+ }
57
+ /
58
+ EMPTY_STRING where_tree {
59
+ def eval
60
+ {
61
+ :like => nil,
62
+ :where => where_tree.eval
63
+ }
64
+ end
65
+ }
66
+ /
67
+ EMPTY_STRING {
68
+ def eval
69
+ {
70
+ :like => nil,
71
+ :where => nil
72
+ }
11
73
  end
12
74
  }
13
75
  end
14
76
 
15
- rule full
16
- "FULL" SPACE
77
+ rule optional_full
78
+ "FULL" SPACES {
79
+ def eval
80
+ true
81
+ end
82
+ }
83
+ /
84
+ EMPTY_STRING {
85
+ def eval
86
+ false
87
+ end
88
+ }
17
89
  end
18
90
 
19
- rule from_table
20
- SPACE "FROM" SPACE table_name
91
+ rule optional_from_table
92
+ SPACES "FROM" SPACES table_name {
93
+ def eval
94
+ table_name.eval
95
+ end
96
+ }
97
+ /
98
+ EMPTY_STRING {
99
+ def eval
100
+ nil
101
+ end
102
+ }
21
103
  end
22
104
 
23
105
  rule like_pattern
24
- SPACE "LIKE" SPACE single_quoted_string
106
+ SPACES "LIKE" SPACES single_quoted_string {
107
+ def eval
108
+ single_quoted_string.eval
109
+ end
110
+ }
25
111
  end
26
112
  end
@@ -2,6 +2,10 @@ grammar SQLTokens
2
2
  rule SPACE
3
3
  " "
4
4
  end
5
+
6
+ rule SPACES
7
+ SPACE+
8
+ end
5
9
 
6
10
  rule OPEN_PARENS
7
11
  '('
@@ -55,10 +59,6 @@ grammar SQLTokens
55
59
  [a-zA-Z]
56
60
  end
57
61
 
58
- rule NON_QUOTE_CHARS
59
- [^'"]
60
- end
61
-
62
62
  rule DIGIT
63
63
  [0-9]
64
64
  end
@@ -73,53 +73,101 @@ grammar SQLTokens
73
73
 
74
74
  rule REAL_KEYWORD
75
75
  "REAL"
76
+ /
77
+ "real"
76
78
  end
77
79
 
78
80
  rule DOUBLE_KEYWORD
79
81
  "DOUBLE"
82
+ /
83
+ "double"
80
84
  end
81
85
 
82
86
  rule FLOAT_KEYWORD
83
87
  "FLOAT"
88
+ /
89
+ "float"
84
90
  end
85
91
 
86
92
  rule DECIMAL_KEYWORD
87
93
  "DECIMAL"
94
+ /
95
+ "decimal"
88
96
  end
89
97
 
90
98
  rule NUMERIC_KEYWORD
91
99
  "NUMERIC"
100
+ /
101
+ "numeric"
92
102
  end
93
103
 
94
104
  rule SMALL_INT_KEYWORD
95
105
  "SMALLINT"
106
+ /
107
+ "smallint"
96
108
  end
97
109
 
98
110
  rule TINY_INT_KEYWORD
99
111
  "TINYINT"
112
+ /
113
+ "tinyint"
100
114
  end
101
115
 
102
116
  rule INT_KEYWORD
103
117
  "INT"
118
+ /
119
+ "int"
104
120
  end
105
121
 
106
122
  rule INTEGER_KEYWORD
107
123
  "INTEGER"
124
+ /
125
+ "integer"
108
126
  end
109
127
 
110
128
  rule ZEROFILL_KEYWORD
111
129
  "ZEROFILL"
130
+ /
131
+ "zerofill"
112
132
  end
113
133
 
114
134
  rule UNSIGNED_KEYWORD
115
135
  "UNSIGNED"
136
+ /
137
+ "unsigned"
116
138
  end
117
139
 
118
140
  rule BIG_INT_KEYWORD
119
141
  "BIGINT"
142
+ /
143
+ "bigint"
120
144
  end
121
145
 
122
146
  rule VARCHAR_KEYWORD
123
147
  "VARCHAR"
148
+ /
149
+ "varchar"
150
+ end
151
+
152
+ rule DATETIME_KEYWORD
153
+ "DATETIME"
154
+ /
155
+ "datetime"
156
+ end
157
+
158
+ rule NOT_KEYWORD
159
+ "NOT"
160
+ /
161
+ "not"
162
+ end
163
+
164
+ rule NULL_KEYWORD
165
+ "NULL"
166
+ /
167
+ "null"
168
+ end
169
+
170
+ rule NON_QUOTE_CHARS
171
+ [^'"]
124
172
  end
125
173
  end
@@ -6,23 +6,44 @@ grammar SQLTransaction
6
6
  end
7
7
 
8
8
  rule start_transaction
9
- "START" SPACE "TRANSACTION" with_consistent_snapshot?
9
+ "START" SPACES "TRANSACTION" with_consistent_snapshot? {
10
+ def query_type
11
+ :start
12
+ end
13
+ def tree
14
+ { :start => nil }
15
+ end
16
+ }
10
17
  end
11
18
 
12
19
  rule with_consistent_snapshot
13
- SPACE "WITH" SPACE "CONSISTENT" SPACE "SNAPSHOT"
20
+ SPACES "WITH" SPACES "CONSISTENT" SPACES "SNAPSHOT"
14
21
  end
15
22
 
16
23
  rule begin
17
- "BEGIN" work?
24
+ "BEGIN" work? {
25
+ def query_type
26
+ :begin
27
+ end
28
+ def tree
29
+ { :begin => nil }
30
+ end
31
+ }
18
32
  end
19
33
 
20
34
  rule work
21
- SPACE "WORK"
35
+ SPACES "WORK"
22
36
  end
23
37
 
24
38
  rule commit
25
- "COMMIT" optional_transactional_clauses
39
+ "COMMIT" optional_transactional_clauses {
40
+ def query_type
41
+ :commit
42
+ end
43
+ def tree
44
+ { :commit => nil }
45
+ end
46
+ }
26
47
  end
27
48
 
28
49
  rule optional_transactional_clauses
@@ -30,14 +51,21 @@ grammar SQLTransaction
30
51
  end
31
52
 
32
53
  rule chain
33
- SPACE "AND" SPACE ("NO" SPACE)? "CHAIN"
54
+ SPACES "AND" SPACES ("NO" SPACES)? "CHAIN"
34
55
  end
35
56
 
36
57
  rule release
37
- SPACE ("NO" SPACE)? "RELEASE"
58
+ SPACES ("NO" SPACES)? "RELEASE"
38
59
  end
39
60
 
40
61
  rule rollback
41
- "ROLLBACK" optional_transactional_clauses
62
+ "ROLLBACK" optional_transactional_clauses {
63
+ def query_type
64
+ :rollback
65
+ end
66
+ def tree
67
+ { :rollback => nil }
68
+ end
69
+ }
42
70
  end
43
71
  end
@@ -2,7 +2,7 @@ grammar SQLWhereCondition
2
2
  include SQLKeyValuePair
3
3
 
4
4
  rule where_condition
5
- "WHERE" SPACE where_clause {
5
+ "WHERE" SPACES where_clause {
6
6
  def eval
7
7
  where_clause.eval
8
8
  end
@@ -16,8 +16,8 @@ grammar SQLWhereCondition
16
16
  end
17
17
  }
18
18
  /
19
- clause1:single_expression_where_clause SPACE
20
- disjunction_or_conjunction_joiner SPACE
19
+ clause1:single_expression_where_clause SPACES
20
+ disjunction_or_conjunction_joiner SPACES
21
21
  clause2:where_clause {
22
22
  def eval
23
23
  klass = Expressions.find_class_for(disjunction_or_conjunction_joiner.eval)
@@ -20,4 +20,5 @@ Treetop.load "#{File.dirname(__FILE__)}/sql_parser/sql_insert.treetop"
20
20
  Treetop.load "#{File.dirname(__FILE__)}/sql_parser/sql_update.treetop"
21
21
  Treetop.load "#{File.dirname(__FILE__)}/sql_parser/sql_datatypes.treetop"
22
22
  Treetop.load "#{File.dirname(__FILE__)}/sql_parser/sql_create_table.treetop"
23
+ Treetop.load "#{File.dirname(__FILE__)}/sql_parser/sql_create_index.treetop"
23
24
  Treetop.load "#{File.dirname(__FILE__)}/sql_parser/sql.treetop"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hipster_sql_to_hbase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Lescure
@@ -14,98 +14,98 @@ dependencies:
14
14
  name: treetop
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jml_thrift
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: json
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rdoc
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 4.0.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 4.0.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: jfish
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.1.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.1.1
111
111
  description: SQL to HBase parser using Treetop (output based on Thrift). Doing all
@@ -119,11 +119,20 @@ extra_rdoc_files:
119
119
  - README.md
120
120
  - README.rdoc
121
121
  files:
122
+ - ".document"
123
+ - Gemfile
124
+ - LICENSE
125
+ - LICENSE.txt
126
+ - README.md
127
+ - README.rdoc
128
+ - Rakefile
129
+ - VERSION
130
+ - hipster_sql_to_hbase.gemspec
131
+ - lib/adapter/Hbase.thrift
132
+ - lib/adapter/hbase.rb
122
133
  - lib/adapter/hbase/hbase.rb
123
134
  - lib/adapter/hbase/hbase_constants.rb
124
135
  - lib/adapter/hbase/hbase_types.rb
125
- - lib/adapter/hbase.rb
126
- - lib/adapter/Hbase.thrift
127
136
  - lib/datatype_extras.rb
128
137
  - lib/executor.rb
129
138
  - lib/hipster_sql_to_hbase.rb
@@ -131,6 +140,7 @@ files:
131
140
  - lib/result_tree_to_json_converter.rb
132
141
  - lib/sql_parser/sql.treetop
133
142
  - lib/sql_parser/sql_chars.treetop
143
+ - lib/sql_parser/sql_create_index.treetop
134
144
  - lib/sql_parser/sql_create_table.treetop
135
145
  - lib/sql_parser/sql_datatypes.treetop
136
146
  - lib/sql_parser/sql_delete.treetop
@@ -155,15 +165,6 @@ files:
155
165
  - lib/sql_treetop_load.rb
156
166
  - spec/hipster_sql_to_hbase_spec.rb
157
167
  - spec/spec_helper.rb
158
- - .document
159
- - Gemfile
160
- - LICENSE
161
- - LICENSE.txt
162
- - README.md
163
- - README.rdoc
164
- - Rakefile
165
- - VERSION
166
- - hipster_sql_to_hbase.gemspec
167
168
  homepage: http://github.com/jeanlescure/hipster_sql_to_hbase
168
169
  licenses:
169
170
  - MIT
@@ -174,19 +175,18 @@ require_paths:
174
175
  - lib
175
176
  required_ruby_version: !ruby/object:Gem::Requirement
176
177
  requirements:
177
- - - '>='
178
+ - - ">="
178
179
  - !ruby/object:Gem::Version
179
180
  version: '0'
180
181
  required_rubygems_version: !ruby/object:Gem::Requirement
181
182
  requirements:
182
- - - '>='
183
+ - - ">="
183
184
  - !ruby/object:Gem::Version
184
185
  version: '0'
185
186
  requirements: []
186
187
  rubyforge_project:
187
- rubygems_version: 2.0.14
188
+ rubygems_version: 2.2.2
188
189
  signing_key:
189
190
  specification_version: 4
190
191
  summary: SQL to HBase parser using Treetop (output based on Thrift).
191
192
  test_files: []
192
- has_rdoc: