[ https://issues.apache.org/jira/browse/CALCITE-5908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde resolved CALCITE-5908. ---------------------------------- Fix Version/s: 1.36.0 Resolution: Fixed Fixed in [6b750b8e|https://github.com/apache/calcite/commit/6b750b8e9b44e644d9073d908c384307b4aa7e2c]; thanks for the PR, [~taoran]! > Refactor: Remove unnecessary null checks in CalciteSchema > --------------------------------------------------------- > > Key: CALCITE-5908 > URL: https://issues.apache.org/jira/browse/CALCITE-5908 > Project: Calcite > Issue Type: Improvement > Components: core > Affects Versions: 1.35.0 > Reporter: Ran Tao > Assignee: Ran Tao > Priority: Minor > Labels: pull-request-available > Fix For: 1.36.0 > > > When i read the source code of `CalciteSchema` found so many null checks > below: > > {code:java} > if (tableMap == null) { > this.tableMap = new NameMap<>(); > } else { > this.tableMap = Objects.requireNonNull(tableMap, "tableMap"); > } > if (latticeMap == null) { > this.latticeMap = new NameMap<>(); > } else { > this.latticeMap = Objects.requireNonNull(latticeMap, "latticeMap"); > } {code} > i think we can remove it. it was misleading. > -- This message was sent by Atlassian Jira (v8.20.10#820010)