[
https://issues.apache.org/jira/browse/CALCITE-7617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stamatis Zampetakis resolved CALCITE-7617.
------------------------------------------
Resolution: Fixed
Fixed in
https://github.com/apache/calcite/commit/ad2f496e23d9e0a022e5b7d25373c71af4e26393.
> Improve type safety of RelJson API using generics
> -------------------------------------------------
>
> Key: CALCITE-7617
> URL: https://issues.apache.org/jira/browse/CALCITE-7617
> Project: Calcite
> Issue Type: Task
> Components: core
> Reporter: Stamatis Zampetakis
> Assignee: Stamatis Zampetakis
> Priority: Minor
> Fix For: 1.43.0
>
>
> The {{RelJson#typeNameToClass}} and {{RelJson#getConstructor}} APIs use raw
> types (Class, Constructor) leading to unchecked casts that may lead to
> unpredictable runtime failures.
> The APIs were meant to work only with sub-classes of the {{RelNode}}
> interface so we can improve type safety by introducing generic types in the
> signatures of the methods. Doing this the code becomes more safer & and more
> readable; redundant casts can be removed and various runtime crashes can now
> be caught during compilation.
> {{RelJson}} is an internal API so the change should not affect end-users.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)