Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/pages/product/configuration/data-sources/pinot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ workloads. [StarTree][link-startree] is a fully-managed platform for Pinot.
- The hostname for the [Pinot][pinot] broker
- The port for the [Pinot][pinot] broker

With the current implementation of the Pinot driver, you have to enable the
[multi-stage query engine][link-pinot-msqe] in your Pinot cluster.
Note that the following features should be enabled in your Pinot cluster:
- [Multi-stage query engine][link-pinot-msqe].
- [Advanced null value support][link-pinot-nvs].

## Setup

Expand Down Expand Up @@ -97,6 +98,7 @@ Cube does not require any additional configuration to enable SSL as Pinot connec
[link-pinot]: https://pinot.apache.org/
[pinot]: https://docs.pinot.apache.org/
[link-pinot-msqe]: https://docs.pinot.apache.org/reference/multi-stage-engine
[link-pinot-nvs]: https://docs.pinot.apache.org/developers/advanced/null-value-support#advanced-null-handling-support
[pinot-docs-approx-agg-fns]:
https://docs.pinot.apache.org/users/user-guide-query/query-syntax/how-to-handle-unique-counting
[ref-recipe-enable-ssl]:
Expand Down
2 changes: 1 addition & 1 deletion packages/cubejs-pinot-driver/src/PinotDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class PinotDriver extends BaseDriver implements DriverInterface {
}),
body: JSON.stringify({
sql: query,
queryOptions: `useMultistageEngine=true;timeoutMs=${this.config.queryTimeout}`
queryOptions: `useMultistageEngine=true;enableNullHandling=true;timeoutMs=${this.config.queryTimeout}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @igorlukanin

Great, the configuration is correct. Is there a possibility to add this same setting as an environment variable?
Where its default value is false?

For example:

enableNullHandling=${this.config.dbNullHandling};  

In: cube/packages/cubejs-pinot-driver/src/PinotDriver.ts

queryTimeout: getEnv('dbNullHandling', { dataSource }),  

So that I can set this variable like this:

CUBEJS_DS_PINOT_DB_NULL_HANDLING=true

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergisulca I think this a great idea. Would you be open to contribute that? You can use this PR as a reference: #8744

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I contributed this in #9213 pull request.

})
});

Expand Down
Loading