{"record":{"id":"021236094f28fdcd","repo":"cube-js/cube","slug":"the-keybydatasource-cubejs-db-pinot-null-handli","errorCode":null,"errorMessage":"The ${keyByDataSource('CUBEJS_DB_PINOT_NULL_HANDLING', dataSource, preAggregations)} must be either 'true' or 'false'.","messagePattern":"The (.+?) must be either 'true' or 'false'\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/cubejs-backend-shared/src/env.ts","lineNumber":1861,"sourceCode":"    preAggregations,\n  }: DataSourceOpts) => (\n    get(keyByDataSource('CUBEJS_DB_PINOT_AUTH_TOKEN', dataSource, preAggregations)).asString()\n  ),\n\n  /**\n   * Pinot / Startree Null value support\n   */\n\n  pinotNullHandling: ({ dataSource, preAggregations }: DataSourceOpts) => {\n    const val = get(keyByDataSource('CUBEJS_DB_PINOT_NULL_HANDLING', dataSource, preAggregations)).asString();\n\n    if (val) {\n      if (val.toLocaleLowerCase() === 'true') {\n        return true;\n      } else if (val.toLowerCase() === 'false') {\n        return false;\n      } else {\n        throw new TypeError(\n          `The ${\n            keyByDataSource(\n              'CUBEJS_DB_PINOT_NULL_HANDLING',\n              dataSource,\n            )\n          } must be either 'true' or 'false'.`\n        );\n      }\n    } else {\n      return false;\n    }\n  },\n\n  /** ****************************************************************\n   * Dremio Driver                                                   *\n   ***************************************************************** */\n\n  /**","sourceCodeStart":1843,"sourceCodeEnd":1879,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-backend-shared/src/env.ts#L1843-L1879","documentation":"Env type validation in env.ts pinotNullHandling: CUBEJS_DB_PINOT_NULL_HANDLING is set to a value other than 'true' or 'false' (case-insensitive). The strict boolean check throws this TypeError when the Pinot driver resolves its null-handling flag, which toggles null value support in StarTree.","triggerScenarios":"Thrown at packages/cubejs-backend-shared/src/env.ts:1861 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set CUBEJS_DB_PINOT_NULL_HANDLING to 'true' or 'false' exactly.","Unset the variable to disable explicit null handling configuration.","Confirm the env value contains no trailing spaces or quotes."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}