You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Gwen Shapira (JIRA)" <ji...@apache.org> on 2014/11/11 23:04:34 UTC

[jira] [Commented] (SQOOP-1621) SQOOP2: Allow null as a dummy Schema

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

Gwen Shapira commented on SQOOP-1621:
-------------------------------------

The benefits of having empty schemas vs. nulls are mainly to preserve semantics.
I.e. a list with no elements is an empty list (not null) and therefore things like appending it to another list will work.

A schema is basically a list of columns with their types (and maybe extra information like primary keys in the future), we may want to support operations like combining and diffing schemas - things that make sense with empty schema but not with null.

Completely agree that we don't control what connectors will implement (and should therefore be cautious), and we can't prevent anyone from returning nulls, but perhaps advise against that?

> SQOOP2: Allow null as a dummy Schema
> ------------------------------------
>
>                 Key: SQOOP-1621
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1621
>             Project: Sqoop
>          Issue Type: Sub-task
>            Reporter: Qian Xu
>            Assignee: Veena Basavaraj
>            Priority: Minor
>              Labels: newbie++
>             Fix For: 1.99.5
>
>
> The {{getSchema}} of a {{Initializer}} cannot return {{null}} as a dummy schema instance, It is not necessary. Caller (i.e. {{Matcher}}) should check schema by using {{schema == null || schema.isEmpty()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)