pinot-client 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1859bffb975457a69f7eb417283f2e4671c5f53b1f7e12b9509ea0704f89c74f
4
+ data.tar.gz: ed8f59fe262df5a4a1133b8dfcac0765066c20528d6f7c9e2fd0326524bf0999
5
+ SHA512:
6
+ metadata.gz: 9e64c60e9cff0130ae77c31fe7898223d9dfe4c95015fb6a40e8a54b1afb3de601c1b58fbde3940e132c07365ebd19cbf56e35746a50d15e3b76913a187111d5
7
+ data.tar.gz: 0653ae3c8241944ceaa4fc982c45e277ca057c4a938754c4b5873d1cf75257c720cd8adeeabb0315ca2401e2268270bad3fc394f9ae6eebab868fdfa8f257490
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,214 @@
1
+ # Ruby Pinot Client
2
+
3
+ [![Build Status](https://github.com/startreedata/ruby-pinot-client/actions/workflows/tests.yml/badge.svg)](https://github.com/startreedata/ruby-pinot-client/actions/workflows/tests.yml)
4
+ [![Gem Version](https://img.shields.io/github/v/release/startreedata/ruby-pinot-client?label=gem)](https://github.com/startreedata/ruby-pinot-client/releases)
5
+
6
+ A Ruby client library for [Apache Pinot](https://pinot.apache.org/). Mirrors the API of the [Go client](https://github.com/startreedata/pinot-client-go) and supports HTTP JSON transport, multiple broker discovery strategies, and parameterized queries.
7
+
8
+ ## Installation
9
+
10
+ Add to your `Gemfile`:
11
+
12
+ ```ruby
13
+ gem "pinot-client", "~> 1.0"
14
+ ```
15
+
16
+ Or install directly:
17
+
18
+ ```bash
19
+ gem install pinot-client
20
+ ```
21
+
22
+ ## Quick Start
23
+
24
+ Start a local Pinot cluster using Docker:
25
+
26
+ ```bash
27
+ docker run -d \
28
+ --name pinot-quickstart \
29
+ -p 8000:8000 \
30
+ apachepinot/pinot:1.5.0 QuickStart -type BATCH
31
+ ```
32
+
33
+ Then query it from Ruby:
34
+
35
+ ```ruby
36
+ require "pinot"
37
+
38
+ client = Pinot.from_broker_list(["localhost:8000"])
39
+ resp = client.execute_sql("baseballStats", "SELECT count(*) AS cnt FROM baseballStats")
40
+ puts resp.result_table.get_long(0, 0) # => 97889
41
+ ```
42
+
43
+ ## Creating a Connection
44
+
45
+ ### From a broker list
46
+
47
+ ```ruby
48
+ client = Pinot.from_broker_list(["localhost:8000"])
49
+ ```
50
+
51
+ For HTTPS brokers, include the scheme:
52
+
53
+ ```ruby
54
+ client = Pinot.from_broker_list(["https://pinot-broker.example.com"])
55
+ ```
56
+
57
+ ### From a controller (dynamic broker discovery)
58
+
59
+ The client periodically polls the controller's `/v2/brokers/tables` API and automatically picks up broker changes.
60
+
61
+ ```ruby
62
+ client = Pinot.from_controller("localhost:9000")
63
+ ```
64
+
65
+ ### From a `ClientConfig`
66
+
67
+ ```ruby
68
+ config = Pinot::ClientConfig.new(
69
+ broker_list: ["localhost:8000"],
70
+ http_timeout: 10, # seconds
71
+ extra_http_header: { "Authorization" => "Bearer <token>" },
72
+ use_multistage_engine: false,
73
+ controller_config: Pinot::ControllerConfig.new(
74
+ controller_address: "localhost:9000",
75
+ update_freq_ms: 1000,
76
+ extra_controller_api_headers: { "Authorization" => "Bearer <token>" }
77
+ )
78
+ )
79
+ client = Pinot.from_config(config)
80
+ ```
81
+
82
+ ## Executing Queries
83
+
84
+ ### Simple SQL
85
+
86
+ ```ruby
87
+ resp = client.execute_sql("baseballStats", "SELECT playerName, homeRuns FROM baseballStats LIMIT 5")
88
+ ```
89
+
90
+ ### Parameterized queries
91
+
92
+ Use `?` placeholders — the client substitutes and quotes values safely:
93
+
94
+ ```ruby
95
+ resp = client.execute_sql_with_params(
96
+ "baseballStats",
97
+ "SELECT playerName FROM baseballStats WHERE teamID = ? AND yearID >= ?",
98
+ ["SFN", 2000]
99
+ )
100
+ ```
101
+
102
+ ### Multistage engine
103
+
104
+ ```ruby
105
+ client.use_multistage_engine = true
106
+ resp = client.execute_sql("baseballStats", "SELECT teamID, count(*) FROM baseballStats GROUP BY teamID")
107
+ ```
108
+
109
+ ### Trace
110
+
111
+ ```ruby
112
+ client.open_trace
113
+ resp = client.execute_sql("baseballStats", "SELECT count(*) FROM baseballStats")
114
+ client.close_trace
115
+ ```
116
+
117
+ ## Reading Results
118
+
119
+ `execute_sql` returns a `Pinot::BrokerResponse`. Results are in `result_table`:
120
+
121
+ ```ruby
122
+ rt = resp.result_table
123
+
124
+ rt.row_count # => number of rows
125
+ rt.column_count # => number of columns
126
+ rt.column_name(0) # => "playerName"
127
+ rt.column_data_type(0)# => "STRING"
128
+
129
+ rt.get(0, 0) # => raw cell value (Pinot::JsonNumber or String)
130
+ rt.get_string(0, 0) # => String
131
+ rt.get_int(0, 1) # => Integer (32-bit)
132
+ rt.get_long(0, 1) # => Integer (64-bit)
133
+ rt.get_float(0, 2) # => Float (32-bit range)
134
+ rt.get_double(0, 2) # => Float (64-bit)
135
+ ```
136
+
137
+ Stat fields on `BrokerResponse`:
138
+
139
+ ```ruby
140
+ resp.time_used_ms
141
+ resp.num_docs_scanned
142
+ resp.total_docs
143
+ resp.exceptions # => Array<Pinot::PinotException>
144
+ resp.num_groups_limit_reached
145
+ ```
146
+
147
+ ## Prepared Statements
148
+
149
+ Prepared statements are thread-safe and can be reused with different parameters.
150
+
151
+ ```ruby
152
+ stmt = client.prepare(
153
+ "baseballStats",
154
+ "SELECT playerName, sum(homeRuns) AS hr FROM baseballStats WHERE teamID = ? AND yearID >= ? GROUP BY playerName ORDER BY hr DESC LIMIT ?"
155
+ )
156
+
157
+ stmt.set_string(1, "NYA")
158
+ stmt.set_int(2, 2000)
159
+ stmt.set_int(3, 10)
160
+ resp = stmt.execute
161
+
162
+ # Or pass params inline:
163
+ resp = stmt.execute_with_params("BOS", 2000, 5)
164
+
165
+ # Reuse with new parameters:
166
+ stmt.clear_parameters
167
+ stmt.set_string(1, "LAA")
168
+ stmt.set_int(2, 2005)
169
+ stmt.set_int(3, 3)
170
+ resp = stmt.execute
171
+
172
+ stmt.close
173
+ ```
174
+
175
+ ### Supported parameter types
176
+
177
+ | Ruby type | SQL rendering |
178
+ |--------------|------------------------|
179
+ | `String` | `'value'` (single-quote escaped) |
180
+ | `Integer` | `42` |
181
+ | `Float` | `3.14` |
182
+ | `TrueClass` / `FalseClass` | `true` / `false` |
183
+ | `BigDecimal` | `'1234567890'` |
184
+ | `Time` | `'2023-01-01 12:00:00.000'` |
185
+
186
+ ## Running Tests
187
+
188
+ ### Unit tests
189
+
190
+ ```bash
191
+ bundle install
192
+ bundle exec rspec spec/pinot/
193
+ ```
194
+
195
+ ### Integration tests (requires a running Pinot cluster)
196
+
197
+ ```bash
198
+ docker run -d --name pinot-quickstart -p 8000:8000 \
199
+ apachepinot/pinot:1.5.0 QuickStart -type BATCH
200
+
201
+ # wait ~2 minutes for the cluster to load data, then:
202
+ bundle exec rspec spec/integration/ --format documentation
203
+ ```
204
+
205
+ Environment variables:
206
+
207
+ | Variable | Default | Description |
208
+ |---------------|-------------|-------------------------|
209
+ | `BROKER_HOST` | `127.0.0.1` | Pinot broker hostname |
210
+ | `BROKER_PORT` | `8000` | Pinot broker HTTP port |
211
+
212
+ ## License
213
+
214
+ Apache License 2.0 — see [LICENSE](LICENSE).
@@ -0,0 +1,7 @@
1
+ module Pinot
2
+ module BrokerSelector
3
+ # Implementers must define:
4
+ # def init -> nil or raise on failure
5
+ # def select_broker(table) -> String "host:port" or raise
6
+ end
7
+ end
@@ -0,0 +1,30 @@
1
+ module Pinot
2
+ class ControllerConfig
3
+ attr_accessor :controller_address, :update_freq_ms, :extra_controller_api_headers
4
+
5
+ def initialize(controller_address: nil, update_freq_ms: 1000, extra_controller_api_headers: {})
6
+ @controller_address = controller_address
7
+ @update_freq_ms = update_freq_ms
8
+ @extra_controller_api_headers = extra_controller_api_headers
9
+ end
10
+ end
11
+
12
+ class ClientConfig
13
+ attr_accessor :broker_list, :http_timeout, :extra_http_header,
14
+ :use_multistage_engine, :controller_config
15
+
16
+ def initialize(
17
+ broker_list: [],
18
+ http_timeout: nil,
19
+ extra_http_header: {},
20
+ use_multistage_engine: false,
21
+ controller_config: nil
22
+ )
23
+ @broker_list = broker_list
24
+ @http_timeout = http_timeout
25
+ @extra_http_header = extra_http_header
26
+ @use_multistage_engine = use_multistage_engine
27
+ @controller_config = controller_config
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,94 @@
1
+ require "bigdecimal"
2
+
3
+ module Pinot
4
+ class Connection
5
+ def initialize(transport:, broker_selector:, use_multistage_engine: false)
6
+ @transport = transport
7
+ @broker_selector = broker_selector
8
+ @use_multistage_engine = use_multistage_engine
9
+ @trace = false
10
+ end
11
+
12
+ def use_multistage_engine=(val)
13
+ @use_multistage_engine = val
14
+ end
15
+
16
+ def open_trace
17
+ @trace = true
18
+ end
19
+
20
+ def close_trace
21
+ @trace = false
22
+ end
23
+
24
+ def execute_sql(table, query)
25
+ broker = @broker_selector.select_broker(table)
26
+ @transport.execute(broker, build_request(query))
27
+ rescue => e
28
+ raise "unable to execute SQL on table #{table}: #{e.message}"
29
+ end
30
+
31
+ def execute_sql_with_params(table, query_pattern, params)
32
+ query = format_query(query_pattern, params)
33
+ execute_sql(table, query)
34
+ rescue => e
35
+ # Re-raise format errors directly (they already have the right message)
36
+ raise e
37
+ end
38
+
39
+ def prepare(table, query_template)
40
+ raise ArgumentError, "table name cannot be empty" if table.nil? || table.strip.empty?
41
+ raise ArgumentError, "query template cannot be empty" if query_template.nil? || query_template.strip.empty?
42
+ count = query_template.count("?")
43
+ raise ArgumentError, "query template must contain at least one parameter placeholder (?)" if count == 0
44
+ PreparedStatementImpl.new(connection: self, table: table, query_template: query_template)
45
+ end
46
+
47
+ def format_query(pattern, params)
48
+ params ||= []
49
+ placeholders = pattern.count("?")
50
+ if placeholders != params.length
51
+ raise "failed to format query: number of placeholders in queryPattern (#{placeholders}) does not match number of params (#{params.length})"
52
+ end
53
+ parts = pattern.split("?", -1)
54
+ result = ""
55
+ params.each_with_index do |param, i|
56
+ formatted = begin
57
+ format_arg(param)
58
+ rescue => e
59
+ raise "failed to format query: failed to format parameter: #{e.message}"
60
+ end
61
+ result += parts[i] + formatted
62
+ end
63
+ result + parts.last
64
+ end
65
+
66
+ def format_arg(value)
67
+ case value
68
+ when String
69
+ "'#{value.gsub("'", "''")}'"
70
+ when Integer
71
+ value.to_s
72
+ when Float
73
+ value.to_s
74
+ when TrueClass, FalseClass
75
+ value.to_s
76
+ when BigDecimal
77
+ s = value.to_s("F")
78
+ # Strip trailing .0 for whole numbers (mirrors Go's big.Int quoted format)
79
+ s = s.sub(/\.0\z/, "") if s.end_with?(".0")
80
+ "'#{s}'"
81
+ when Time
82
+ "'#{value.utc.strftime("%Y-%m-%d %H:%M:%S.") + format("%03d", value.utc.subsec * 1000)}'"
83
+ else
84
+ raise "unsupported type: #{value.class}"
85
+ end
86
+ end
87
+
88
+ private
89
+
90
+ def build_request(query)
91
+ Request.new("sql", query, @trace, @use_multistage_engine)
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,43 @@
1
+ module Pinot
2
+ def self.from_broker_list(broker_list, http_client: nil)
3
+ config = ClientConfig.new(broker_list: broker_list)
4
+ from_config(config, http_client: http_client)
5
+ end
6
+
7
+ def self.from_controller(controller_address, http_client: nil)
8
+ config = ClientConfig.new(
9
+ controller_config: ControllerConfig.new(controller_address: controller_address)
10
+ )
11
+ from_config(config, http_client: http_client)
12
+ end
13
+
14
+ def self.from_config(config, http_client: nil)
15
+ inner = http_client || HttpClient.new(timeout: config.http_timeout)
16
+
17
+ transport = JsonHttpTransport.new(
18
+ http_client: inner,
19
+ extra_headers: config.extra_http_header || {}
20
+ )
21
+
22
+ selector = build_selector(config, inner)
23
+ raise ArgumentError, "must specify broker_list or controller_config" unless selector
24
+
25
+ conn = Connection.new(
26
+ transport: transport,
27
+ broker_selector: selector,
28
+ use_multistage_engine: config.use_multistage_engine || false
29
+ )
30
+
31
+ selector.init
32
+ conn
33
+ end
34
+
35
+ def self.build_selector(config, http_client)
36
+ if config.broker_list && !config.broker_list.empty?
37
+ SimpleBrokerSelector.new(config.broker_list)
38
+ elsif config.controller_config
39
+ ControllerBasedBrokerSelector.new(config.controller_config, http_client)
40
+ end
41
+ end
42
+ private_class_method :build_selector
43
+ end
@@ -0,0 +1,74 @@
1
+ require "net/http"
2
+ require "uri"
3
+ require "json"
4
+
5
+ module Pinot
6
+ class ControllerBasedBrokerSelector < TableAwareBrokerSelector
7
+ CONTROLLER_API_PATH = "/v2/brokers/tables?state=ONLINE"
8
+ DEFAULT_UPDATE_FREQ_MS = 1000
9
+
10
+ def initialize(config, http_client = nil)
11
+ super()
12
+ @config = config
13
+ @internal_http = http_client || HttpClient.new
14
+ end
15
+
16
+ def init
17
+ @config.update_freq_ms ||= DEFAULT_UPDATE_FREQ_MS
18
+ @controller_url = build_controller_url(@config.controller_address)
19
+ fetch_and_update
20
+ start_background_refresh
21
+ nil
22
+ end
23
+
24
+ def build_controller_url(address)
25
+ addr = address.to_s
26
+ if addr.include?("://")
27
+ scheme = addr.split("://").first
28
+ unless %w[http https].include?(scheme)
29
+ raise "unsupported controller URL scheme: #{scheme}"
30
+ end
31
+ addr.chomp("/") + CONTROLLER_API_PATH
32
+ else
33
+ "http://#{addr.chomp("/")}#{CONTROLLER_API_PATH}"
34
+ end
35
+ end
36
+
37
+ private
38
+
39
+ def fetch_and_update
40
+ headers = { "Accept" => "application/json" }
41
+ .merge(@config.extra_controller_api_headers || {})
42
+
43
+ resp = @internal_http.get(@controller_url, headers: headers)
44
+
45
+ unless resp.code.to_i == 200
46
+ raise "controller API returned HTTP status code #{resp.code}"
47
+ end
48
+
49
+ body = resp.body
50
+ begin
51
+ raw = JSON.parse(body)
52
+ rescue JSON::ParserError => e
53
+ raise "error decoding controller API response: #{e.message}"
54
+ end
55
+
56
+ cr = ControllerResponse.new(raw)
57
+ update_broker_data(cr.extract_broker_list, cr.extract_table_to_broker_map)
58
+ end
59
+
60
+ def start_background_refresh
61
+ interval = @config.update_freq_ms / 1000.0
62
+ Thread.new do
63
+ loop do
64
+ sleep interval
65
+ begin
66
+ fetch_and_update
67
+ rescue => e
68
+ warn "Pinot: error refreshing broker data: #{e.message}"
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,31 @@
1
+ module Pinot
2
+ class BrokerDto
3
+ attr_reader :host, :port, :instance_name
4
+
5
+ def initialize(hash)
6
+ @host = hash["host"]
7
+ @port = hash["port"].to_i
8
+ @instance_name = hash["instanceName"]
9
+ end
10
+
11
+ def broker_address
12
+ "#{@host}:#{@port}"
13
+ end
14
+ end
15
+
16
+ class ControllerResponse
17
+ def initialize(raw_hash)
18
+ @data = raw_hash.transform_values do |brokers|
19
+ brokers.map { |b| BrokerDto.new(b) }
20
+ end
21
+ end
22
+
23
+ def extract_broker_list
24
+ @data.values.flatten.map(&:broker_address).uniq
25
+ end
26
+
27
+ def extract_table_to_broker_map
28
+ @data.transform_values { |brokers| brokers.map(&:broker_address) }
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,123 @@
1
+ module Pinot
2
+ module PreparedStatement
3
+ # Duck-type interface — implementers must define:
4
+ # set_string, set_int, set_int64, set_float64, set_bool, set
5
+ # execute, execute_with_params
6
+ # clear_parameters, close
7
+ # get_query, get_parameter_count
8
+ end
9
+
10
+ class PreparedStatementImpl
11
+ include PreparedStatement
12
+
13
+ def initialize(connection:, table:, query_template:)
14
+ @connection = connection
15
+ @table = table
16
+ @query_template = query_template
17
+ @parts = query_template.split("?", -1)
18
+ @param_count = @parts.length - 1
19
+ @parameters = Array.new(@param_count)
20
+ @mutex = Mutex.new
21
+ @closed = false
22
+ end
23
+
24
+ def get_query
25
+ @query_template
26
+ end
27
+
28
+ def get_parameter_count
29
+ @param_count
30
+ end
31
+
32
+ def set_string(index, value)
33
+ set(index, value.to_s)
34
+ end
35
+
36
+ def set_int(index, value)
37
+ set(index, value.to_i)
38
+ end
39
+
40
+ def set_int64(index, value)
41
+ set(index, value.to_i)
42
+ end
43
+
44
+ def set_float64(index, value)
45
+ set(index, value.to_f)
46
+ end
47
+
48
+ def set_bool(index, value)
49
+ set(index, !!value)
50
+ end
51
+
52
+ def set(index, value)
53
+ @mutex.synchronize do
54
+ raise "prepared statement is closed" if @closed
55
+ unless index >= 1 && index <= @param_count
56
+ raise "parameter index #{index} is out of range [1, #{@param_count}]"
57
+ end
58
+ @parameters[index - 1] = value
59
+ end
60
+ nil
61
+ end
62
+
63
+ def execute
64
+ @mutex.synchronize do
65
+ raise "prepared statement is closed" if @closed
66
+ @parameters.each_with_index do |p, i|
67
+ raise "parameter at index #{i + 1} is not set" if p.nil?
68
+ end
69
+ end
70
+ query = begin
71
+ build_query(@parameters)
72
+ rescue => e
73
+ raise "failed to build query: #{e.message}"
74
+ end
75
+ @connection.execute_sql(@table, query)
76
+ end
77
+
78
+ def execute_with_params(*params)
79
+ @mutex.synchronize { raise "prepared statement is closed" if @closed }
80
+ if params.length != @param_count
81
+ raise "expected #{@param_count} parameters, got #{params.length}"
82
+ end
83
+ query = begin
84
+ build_query(params)
85
+ rescue => e
86
+ raise "failed to build query: #{e.message}"
87
+ end
88
+ @connection.execute_sql(@table, query)
89
+ end
90
+
91
+ def clear_parameters
92
+ @mutex.synchronize do
93
+ raise "prepared statement is closed" if @closed
94
+ @parameters.fill(nil)
95
+ end
96
+ nil
97
+ end
98
+
99
+ def close
100
+ @mutex.synchronize do
101
+ @closed = true
102
+ @parameters = nil
103
+ end
104
+ nil
105
+ end
106
+
107
+ def build_query(params)
108
+ if params.length != @param_count
109
+ raise "expected #{@param_count} parameters, got #{params.length}"
110
+ end
111
+ result = ""
112
+ params.each_with_index do |param, i|
113
+ formatted = begin
114
+ @connection.format_arg(param)
115
+ rescue => e
116
+ raise "failed to format parameter: #{e.message}"
117
+ end
118
+ result += @parts[i] + formatted
119
+ end
120
+ result + @parts.last
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,3 @@
1
+ module Pinot
2
+ Request = Struct.new(:query_format, :query, :trace, :use_multistage_engine)
3
+ end
@@ -0,0 +1,220 @@
1
+ require "bigdecimal"
2
+
3
+ module Pinot
4
+ INT32_MAX = 2_147_483_647
5
+ INT32_MIN = -2_147_483_648
6
+ INT64_MAX = 9_223_372_036_854_775_807
7
+ INT64_MIN = -9_223_372_036_854_775_808
8
+ FLOAT32_MAX = 3.4028235e+38
9
+
10
+ # Mirrors Go's json.Number — stores the raw string representation of a JSON number.
11
+ class JsonNumber
12
+ attr_reader :raw
13
+
14
+ def initialize(raw)
15
+ @raw = raw.to_s
16
+ end
17
+
18
+ def to_s
19
+ @raw
20
+ end
21
+
22
+ def ==(other)
23
+ case other
24
+ when JsonNumber then @raw == other.raw
25
+ else false
26
+ end
27
+ end
28
+ end
29
+
30
+ class RespSchema
31
+ attr_reader :column_names, :column_data_types
32
+
33
+ def initialize(hash)
34
+ @column_names = hash["columnNames"] || []
35
+ @column_data_types = hash["columnDataTypes"] || []
36
+ end
37
+ end
38
+
39
+ class PinotException
40
+ attr_reader :error_code, :message
41
+
42
+ def initialize(hash)
43
+ @error_code = hash["errorCode"]
44
+ @message = hash["message"]
45
+ end
46
+ end
47
+
48
+ class SelectionResults
49
+ attr_reader :columns, :results
50
+
51
+ def initialize(hash)
52
+ @columns = hash["columns"] || []
53
+ @results = hash["results"] || []
54
+ end
55
+ end
56
+
57
+ class AggregationResult
58
+ attr_reader :function, :value, :group_by_columns, :group_by_result
59
+
60
+ def initialize(hash)
61
+ @function = hash["function"]
62
+ @value = hash["value"]
63
+ @group_by_columns = hash["groupByColumns"]
64
+ @group_by_result = hash["groupByResult"]
65
+ end
66
+ end
67
+
68
+ class ResultTable
69
+ attr_reader :data_schema, :rows
70
+
71
+ def initialize(hash)
72
+ @data_schema = RespSchema.new(hash["dataSchema"] || {})
73
+ raw_rows = hash["rows"] || []
74
+ @rows = raw_rows.map do |row|
75
+ row.map { |cell| cell.is_a?(Numeric) ? JsonNumber.new(cell) : cell }
76
+ end
77
+ end
78
+
79
+ def row_count
80
+ @rows.length
81
+ end
82
+
83
+ def column_count
84
+ @data_schema.column_names.length
85
+ end
86
+
87
+ def column_name(i)
88
+ @data_schema.column_names[i]
89
+ end
90
+
91
+ def column_data_type(i)
92
+ @data_schema.column_data_types[i]
93
+ end
94
+
95
+ def get(row, col)
96
+ @rows[row][col]
97
+ end
98
+
99
+ def get_string(row, col)
100
+ @rows[row][col].to_s
101
+ end
102
+
103
+ def get_int(row, col)
104
+ cell = @rows[row][col]
105
+ return 0 unless cell.is_a?(JsonNumber)
106
+
107
+ raw = cell.raw
108
+ begin
109
+ # Try parsing as integer first
110
+ if raw.include?(".") || raw.include?("e") || raw.include?("E")
111
+ # Floating point string — check if it's a whole number
112
+ bd = BigDecimal(raw)
113
+ return 0 if bd.infinite? || bd.nan? rescue return 0
114
+ int_val = bd.to_i
115
+ return 0 unless bd == BigDecimal(int_val.to_s)
116
+ return 0 if int_val > INT32_MAX || int_val < INT32_MIN
117
+ int_val.to_i
118
+ else
119
+ int_val = Integer(raw)
120
+ return 0 if int_val > INT32_MAX || int_val < INT32_MIN
121
+ int_val
122
+ end
123
+ rescue ArgumentError, TypeError
124
+ 0
125
+ end
126
+ end
127
+
128
+ def get_long(row, col)
129
+ cell = @rows[row][col]
130
+ return 0 unless cell.is_a?(JsonNumber)
131
+
132
+ raw = cell.raw
133
+ begin
134
+ if raw.include?(".") || raw.include?("e") || raw.include?("E")
135
+ bd = BigDecimal(raw)
136
+ return 0 if bd.infinite? || bd.nan? rescue return 0
137
+ int_val = bd.to_i
138
+ return 0 unless bd == BigDecimal(int_val.to_s)
139
+ return 0 if int_val > INT64_MAX || int_val < INT64_MIN
140
+ int_val
141
+ else
142
+ int_val = Integer(raw)
143
+ return 0 if int_val > INT64_MAX || int_val < INT64_MIN
144
+ int_val
145
+ end
146
+ rescue ArgumentError, TypeError
147
+ 0
148
+ end
149
+ end
150
+
151
+ def get_float(row, col)
152
+ cell = @rows[row][col]
153
+ return 0.0 unless cell.is_a?(JsonNumber)
154
+
155
+ raw = cell.raw
156
+ begin
157
+ f = Float(raw)
158
+ return 0.0 if f.infinite? || f.nan?
159
+ f32 = f.to_f
160
+ return 0.0 if f32.abs > FLOAT32_MAX
161
+ f32
162
+ rescue ArgumentError, TypeError
163
+ 0.0
164
+ end
165
+ end
166
+
167
+ def get_double(row, col)
168
+ cell = @rows[row][col]
169
+ return 0.0 unless cell.is_a?(JsonNumber)
170
+
171
+ raw = cell.raw
172
+ begin
173
+ f = Float(raw)
174
+ return 0.0 if f.infinite? || f.nan?
175
+ f
176
+ rescue ArgumentError, TypeError
177
+ 0.0
178
+ end
179
+ end
180
+ end
181
+
182
+ class BrokerResponse
183
+ attr_reader :selection_results, :result_table, :aggregation_results,
184
+ :exceptions, :trace_info,
185
+ :num_segments_processed, :num_servers_responded,
186
+ :num_segments_queried, :num_servers_queried,
187
+ :num_segments_matched, :num_consuming_segments_queried,
188
+ :num_docs_scanned, :num_entries_scanned_in_filter,
189
+ :num_entries_scanned_post_filter, :total_docs,
190
+ :time_used_ms, :min_consuming_freshness_time_ms,
191
+ :num_groups_limit_reached
192
+
193
+ def self.from_json(json_str)
194
+ hash = JSON.parse(json_str)
195
+ new(hash)
196
+ end
197
+
198
+ def initialize(hash)
199
+ @selection_results = hash["selectionResults"] ? SelectionResults.new(hash["selectionResults"]) : nil
200
+ @result_table = hash["resultTable"] ? ResultTable.new(hash["resultTable"]) : nil
201
+ @aggregation_results = (hash["aggregationResults"] || []).map { |r| AggregationResult.new(r) }
202
+ @exceptions = (hash["exceptions"] || []).map { |e| PinotException.new(e) }
203
+ @trace_info = hash["traceInfo"] || {}
204
+
205
+ @num_servers_queried = hash["numServersQueried"] || 0
206
+ @num_servers_responded = hash["numServersResponded"] || 0
207
+ @num_segments_queried = hash["numSegmentsQueried"] || 0
208
+ @num_segments_processed = hash["numSegmentsProcessed"] || 0
209
+ @num_segments_matched = hash["numSegmentsMatched"] || 0
210
+ @num_consuming_segments_queried = hash["numConsumingSegmentsQueried"] || 0
211
+ @num_docs_scanned = hash["numDocsScanned"] || 0
212
+ @num_entries_scanned_in_filter = hash["numEntriesScannedInFilter"] || 0
213
+ @num_entries_scanned_post_filter = hash["numEntriesScannedPostFilter"] || 0
214
+ @num_groups_limit_reached = hash["numGroupsLimitReached"] || false
215
+ @total_docs = hash["totalDocs"] || 0
216
+ @time_used_ms = hash["timeUsedMs"] || 0
217
+ @min_consuming_freshness_time_ms = hash["minConsumingFreshnessTimeMs"] || 0
218
+ end
219
+ end
220
+ end
@@ -0,0 +1,18 @@
1
+ module Pinot
2
+ class SimpleBrokerSelector
3
+ include BrokerSelector
4
+
5
+ def initialize(broker_list)
6
+ @broker_list = broker_list.dup.freeze
7
+ end
8
+
9
+ def init
10
+ raise "no pre-configured broker lists" if @broker_list.empty?
11
+ end
12
+
13
+ def select_broker(_table)
14
+ raise "no pre-configured broker lists" if @broker_list.empty?
15
+ @broker_list.sample
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,45 @@
1
+ module Pinot
2
+ class TableAwareBrokerSelector
3
+ include BrokerSelector
4
+
5
+ OFFLINE_SUFFIX = "_OFFLINE"
6
+ REALTIME_SUFFIX = "_REALTIME"
7
+
8
+ def initialize
9
+ @mutex = Mutex.new
10
+ @all_broker_list = []
11
+ @table_broker_map = {}
12
+ end
13
+
14
+ def init
15
+ raise NotImplementedError, "subclasses must implement init"
16
+ end
17
+
18
+ def select_broker(table)
19
+ table_name = extract_table_name(table.to_s)
20
+ @mutex.synchronize do
21
+ if table_name.empty?
22
+ raise "no available broker" if @all_broker_list.empty?
23
+ return @all_broker_list.sample
24
+ end
25
+ brokers = @table_broker_map[table_name]
26
+ raise "unable to find table: #{table}" unless brokers
27
+ raise "no available broker for table: #{table}" if brokers.empty?
28
+ brokers.sample
29
+ end
30
+ end
31
+
32
+ def update_broker_data(all_brokers, table_map)
33
+ @mutex.synchronize do
34
+ @all_broker_list = all_brokers
35
+ @table_broker_map = table_map
36
+ end
37
+ end
38
+
39
+ private
40
+
41
+ def extract_table_name(table)
42
+ table.sub(/#{OFFLINE_SUFFIX}\z/, "").sub(/#{REALTIME_SUFFIX}\z/, "")
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,103 @@
1
+ require "net/http"
2
+ require "uri"
3
+ require "json"
4
+ require "securerandom"
5
+
6
+ module Pinot
7
+ class HttpClient
8
+ def initialize(timeout: nil)
9
+ @timeout = timeout
10
+ end
11
+
12
+ def post(url, body:, headers: {})
13
+ uri = URI.parse(url)
14
+ http = Net::HTTP.new(uri.host, uri.port)
15
+ http.use_ssl = uri.scheme == "https"
16
+ if @timeout
17
+ http.open_timeout = @timeout
18
+ http.read_timeout = @timeout
19
+ end
20
+ req = Net::HTTP::Post.new(uri.request_uri)
21
+ headers.each { |k, v| req[k] = v }
22
+ req.body = body
23
+ http.request(req)
24
+ end
25
+
26
+ def get(url, headers: {})
27
+ uri = URI.parse(url)
28
+ http = Net::HTTP.new(uri.host, uri.port)
29
+ http.use_ssl = uri.scheme == "https"
30
+ if @timeout
31
+ http.open_timeout = @timeout
32
+ http.read_timeout = @timeout
33
+ end
34
+ req = Net::HTTP::Get.new(uri.request_uri)
35
+ headers.each { |k, v| req[k] = v }
36
+ http.request(req)
37
+ end
38
+ end
39
+
40
+ class JsonHttpTransport
41
+ DEFAULT_HEADERS = {
42
+ "Content-Type" => "application/json; charset=utf-8"
43
+ }.freeze
44
+
45
+ def initialize(http_client:, extra_headers: {}, timeout_ms: nil)
46
+ @http_client = http_client
47
+ @extra_headers = extra_headers
48
+ @timeout_ms = timeout_ms
49
+ end
50
+
51
+ def execute(broker_address, request)
52
+ url = build_url(broker_address, request.query_format)
53
+ body = build_body(request)
54
+ headers = DEFAULT_HEADERS
55
+ .merge(@extra_headers)
56
+ .merge("X-Correlation-Id" => SecureRandom.uuid)
57
+
58
+ resp = @http_client.post(url, body: body, headers: headers)
59
+
60
+ unless resp.code.to_i == 200
61
+ raise "http exception with HTTP status code #{resp.code}"
62
+ end
63
+
64
+ begin
65
+ BrokerResponse.from_json(resp.body)
66
+ rescue JSON::ParserError => e
67
+ raise e.message
68
+ end
69
+ end
70
+
71
+ private
72
+
73
+ def build_url(broker_address, query_format)
74
+ base = if broker_address.start_with?("http://", "https://")
75
+ broker_address
76
+ else
77
+ "http://#{broker_address}"
78
+ end
79
+ path = query_format == "sql" ? "/query/sql" : "/query"
80
+ "#{base}#{path}"
81
+ end
82
+
83
+ def build_body(request)
84
+ payload = { request.query_format => request.query }
85
+ opts = build_query_options(request)
86
+ payload["queryOptions"] = opts unless opts.empty?
87
+ payload["trace"] = "true" if request.trace
88
+ JSON.generate(payload)
89
+ end
90
+
91
+ def build_query_options(request)
92
+ parts = []
93
+ if request.query_format == "sql"
94
+ parts << "groupByMode=sql;responseFormat=sql"
95
+ parts << "useMultistageEngine=true" if request.use_multistage_engine
96
+ if @timeout_ms && @timeout_ms > 0
97
+ parts << "timeoutMs=#{@timeout_ms}"
98
+ end
99
+ end
100
+ parts.join(";")
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,3 @@
1
+ module Pinot
2
+ VERSION = "1.0.2"
3
+ end
data/lib/pinot.rb ADDED
@@ -0,0 +1,19 @@
1
+ require "net/http"
2
+ require "uri"
3
+ require "json"
4
+ require "bigdecimal"
5
+ require "securerandom"
6
+
7
+ require_relative "pinot/version"
8
+ require_relative "pinot/config"
9
+ require_relative "pinot/request"
10
+ require_relative "pinot/response"
11
+ require_relative "pinot/broker_selector"
12
+ require_relative "pinot/simple_broker_selector"
13
+ require_relative "pinot/table_aware_broker_selector"
14
+ require_relative "pinot/controller_response"
15
+ require_relative "pinot/controller_based_broker_selector"
16
+ require_relative "pinot/transport"
17
+ require_relative "pinot/connection"
18
+ require_relative "pinot/prepared_statement"
19
+ require_relative "pinot/connection_factory"
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pinot-client
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Xiang Fu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-04-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: webmock
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.18'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.18'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '13.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '13.0'
55
+ description: A Ruby client for Apache Pinot, mirroring the Go client API
56
+ email:
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - LICENSE
62
+ - README.md
63
+ - lib/pinot.rb
64
+ - lib/pinot/broker_selector.rb
65
+ - lib/pinot/config.rb
66
+ - lib/pinot/connection.rb
67
+ - lib/pinot/connection_factory.rb
68
+ - lib/pinot/controller_based_broker_selector.rb
69
+ - lib/pinot/controller_response.rb
70
+ - lib/pinot/prepared_statement.rb
71
+ - lib/pinot/request.rb
72
+ - lib/pinot/response.rb
73
+ - lib/pinot/simple_broker_selector.rb
74
+ - lib/pinot/table_aware_broker_selector.rb
75
+ - lib/pinot/transport.rb
76
+ - lib/pinot/version.rb
77
+ homepage: https://github.com/startreedata/ruby-pinot-client
78
+ licenses:
79
+ - Apache-2.0
80
+ metadata:
81
+ homepage_uri: https://github.com/startreedata/ruby-pinot-client
82
+ source_code_uri: https://github.com/startreedata/ruby-pinot-client
83
+ bug_tracker_uri: https://github.com/startreedata/ruby-pinot-client/issues
84
+ github_repo: ssh://git@github.com/startreedata/ruby-pinot-client
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '2.6'
94
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ requirements: []
100
+ rubygems_version: 3.4.19
101
+ signing_key:
102
+ specification_version: 4
103
+ summary: Apache Pinot Ruby client
104
+ test_files: []