You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/10/04 17:17:00 UTC

[jira] [Commented] (CALCITE-4268) org.apache.calcite.model.ModelHandler#checkRequiredAttributes should use Objects.requireNonNull

    [ https://issues.apache.org/jira/browse/CALCITE-4268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17207694#comment-17207694 ] 

Vladimir Sitnikov commented on CALCITE-4268:
--------------------------------------------

The field is declared as required:
{code:java}
  /** Name of the factory class for this table.
   *
   * <p>Required. Must implement interface
   * {@link org.apache.calcite.schema.TableFactory} and have a public default
   * constructor.
   */
  public final String factory;
{code}

However, {{ModelTest}} often ignores it, so it causes test failure.

I'm inclined that {{ModelTest}} should adhere to the requirements, so it should provide a table factory.

> org.apache.calcite.model.ModelHandler#checkRequiredAttributes should use Objects.requireNonNull
> -----------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4268
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4268
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 1.25.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Vladimir Sitnikov
>            Priority: Major
>
> {{ModelHandler#checkRequiredAttributes}} uses reflection to ensure fields are non-null, however, {{Objects.requireNonNull}} or something like that would be easier to follow.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)