You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Navis류승우 <na...@nexr.com> on 2014/07/10 05:48:02 UTC

Case problem in complex type

For column name, hive restricts it as a lower case string. But how about
field name? Currently, StructObjectInspector except ORC ignores case(lower
case only). This should not be implementation dependent and should be
documented somewhere.

see https://issues.apache.org/jira/browse/HIVE-6198

Thanks,
Navis

Re: Case problem in complex type

Posted by Navis류승우 <na...@nexr.com>.
Yes, it might be. But I think it's lower cased by mistake because first
fields in struct was all column names. There are plenty of complex data
including XML and Json, which is case sensitive. I afraid we are losing
cases for them.


2014-07-13 2:26 GMT+09:00 Ashutosh Chauhan <ha...@apache.org>:

> Following POLA[1] I would suggest that ORC should follow conventions as
> rest of Hive. If all other Struct OI are case-insensitive, than ORC should
> be as well.
>
> 1: http://en.wikipedia.org/wiki/Principle_of_least_astonishment
>
>
> On Thu, Jul 10, 2014 at 10:21 PM, Navis류승우 <na...@nexr.com> wrote:
>
> > Any opinions? IMO, field names should be case-sensitive, but I'm doubt on
> > backward compatibility issue.
> >
> > Thanks,
> > Navis
> >
> >
> > 2014-07-10 13:31 GMT+09:00 Lefty Leverenz <le...@gmail.com>:
> >
> > > Struct doesn't have its own section in the Types doc
> > > <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types
> >,
> > > but it could (see Complex Types
> > > <
> > >
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-ComplexTypes
> > > >).
> > >  However I don't think people will look there for information about
> case
> > > sensitivity -- it belongs in the DDL and DML docs.  Case-insensitivity
> > for
> > > column names is mentioned here:
> > >
> > >    - Create Table
> > >    <
> > >
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable
> > > >
> > >    (notes immediately after the syntax)
> > >    - Alter Column -- Rules for Column Names
> > >    <
> > >
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterColumn
> > > >
> > >
> > >    - Select Syntax
> > >    <
> > >
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select#LanguageManualSelect-SelectSyntax
> > > >
> > >    (notes after the syntax)
> > >
> > > The ORC doc could also mention this issue, preferably in the section
> Hive
> > > QL Syntax
> > > <
> > >
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+ORC#LanguageManualORC-HiveQLSyntax
> > > >
> > > .
> > >
> > >
> > > -- Lefty
> > >
> > >
> > > On Wed, Jul 9, 2014 at 11:48 PM, Navis류승우 <na...@nexr.com> wrote:
> > >
> > > > For column name, hive restricts it as a lower case string. But how
> > about
> > > > field name? Currently, StructObjectInspector except ORC ignores
> > > case(lower
> > > > case only). This should not be implementation dependent and should be
> > > > documented somewhere.
> > > >
> > > > see https://issues.apache.org/jira/browse/HIVE-6198
> > > >
> > > > Thanks,
> > > > Navis
> > > >
> > >
> >
>

Re: Case problem in complex type

Posted by Ashutosh Chauhan <ha...@apache.org>.
Following POLA[1] I would suggest that ORC should follow conventions as
rest of Hive. If all other Struct OI are case-insensitive, than ORC should
be as well.

1: http://en.wikipedia.org/wiki/Principle_of_least_astonishment


On Thu, Jul 10, 2014 at 10:21 PM, Navis류승우 <na...@nexr.com> wrote:

> Any opinions? IMO, field names should be case-sensitive, but I'm doubt on
> backward compatibility issue.
>
> Thanks,
> Navis
>
>
> 2014-07-10 13:31 GMT+09:00 Lefty Leverenz <le...@gmail.com>:
>
> > Struct doesn't have its own section in the Types doc
> > <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types>,
> > but it could (see Complex Types
> > <
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-ComplexTypes
> > >).
> >  However I don't think people will look there for information about case
> > sensitivity -- it belongs in the DDL and DML docs.  Case-insensitivity
> for
> > column names is mentioned here:
> >
> >    - Create Table
> >    <
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable
> > >
> >    (notes immediately after the syntax)
> >    - Alter Column -- Rules for Column Names
> >    <
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterColumn
> > >
> >
> >    - Select Syntax
> >    <
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select#LanguageManualSelect-SelectSyntax
> > >
> >    (notes after the syntax)
> >
> > The ORC doc could also mention this issue, preferably in the section Hive
> > QL Syntax
> > <
> >
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+ORC#LanguageManualORC-HiveQLSyntax
> > >
> > .
> >
> >
> > -- Lefty
> >
> >
> > On Wed, Jul 9, 2014 at 11:48 PM, Navis류승우 <na...@nexr.com> wrote:
> >
> > > For column name, hive restricts it as a lower case string. But how
> about
> > > field name? Currently, StructObjectInspector except ORC ignores
> > case(lower
> > > case only). This should not be implementation dependent and should be
> > > documented somewhere.
> > >
> > > see https://issues.apache.org/jira/browse/HIVE-6198
> > >
> > > Thanks,
> > > Navis
> > >
> >
>

Re: Case problem in complex type

Posted by Navis류승우 <na...@nexr.com>.
Any opinions? IMO, field names should be case-sensitive, but I'm doubt on
backward compatibility issue.

Thanks,
Navis


2014-07-10 13:31 GMT+09:00 Lefty Leverenz <le...@gmail.com>:

> Struct doesn't have its own section in the Types doc
> <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types>,
> but it could (see Complex Types
> <
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-ComplexTypes
> >).
>  However I don't think people will look there for information about case
> sensitivity -- it belongs in the DDL and DML docs.  Case-insensitivity for
> column names is mentioned here:
>
>    - Create Table
>    <
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable
> >
>    (notes immediately after the syntax)
>    - Alter Column -- Rules for Column Names
>    <
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterColumn
> >
>
>    - Select Syntax
>    <
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select#LanguageManualSelect-SelectSyntax
> >
>    (notes after the syntax)
>
> The ORC doc could also mention this issue, preferably in the section Hive
> QL Syntax
> <
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+ORC#LanguageManualORC-HiveQLSyntax
> >
> .
>
>
> -- Lefty
>
>
> On Wed, Jul 9, 2014 at 11:48 PM, Navis류승우 <na...@nexr.com> wrote:
>
> > For column name, hive restricts it as a lower case string. But how about
> > field name? Currently, StructObjectInspector except ORC ignores
> case(lower
> > case only). This should not be implementation dependent and should be
> > documented somewhere.
> >
> > see https://issues.apache.org/jira/browse/HIVE-6198
> >
> > Thanks,
> > Navis
> >
>

Re: Case problem in complex type

Posted by Lefty Leverenz <le...@gmail.com>.
Struct doesn't have its own section in the Types doc
<https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types>,
but it could (see Complex Types
<https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Types#LanguageManualTypes-ComplexTypes>).
 However I don't think people will look there for information about case
sensitivity -- it belongs in the DDL and DML docs.  Case-insensitivity for
column names is mentioned here:

   - Create Table
   <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable>
   (notes immediately after the syntax)
   - Alter Column -- Rules for Column Names
   <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterColumn>

   - Select Syntax
   <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select#LanguageManualSelect-SelectSyntax>
   (notes after the syntax)

The ORC doc could also mention this issue, preferably in the section Hive
QL Syntax
<https://cwiki.apache.org/confluence/display/Hive/LanguageManual+ORC#LanguageManualORC-HiveQLSyntax>
.


-- Lefty


On Wed, Jul 9, 2014 at 11:48 PM, Navis류승우 <na...@nexr.com> wrote:

> For column name, hive restricts it as a lower case string. But how about
> field name? Currently, StructObjectInspector except ORC ignores case(lower
> case only). This should not be implementation dependent and should be
> documented somewhere.
>
> see https://issues.apache.org/jira/browse/HIVE-6198
>
> Thanks,
> Navis
>