You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Pengcheng Xiong <px...@apache.org> on 2016/10/01 03:52:40 UTC

[DISCUSSION] Deprecate HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS

Hi all,

    I logged HIVE-14872 <https://issues.apache.org/jira/browse/HIVE-14872> to
deprecate the configuration of HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS. The
main purpose for the configuration of HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS
is for backward compatibility (See HIVE-6617) because a lot of reserved key
words have been used as identifiers in the previous releases. We already
have had several releases with this configuration.

    Now when I tried to add new set operators to the parser, ANTLR is
always complaining "code too large". I think it is time to remove this
configuration. (1) It will simplify the parser logic and largely reduce the
size of generated parser code; (2) it leave space for new features,
especially those which require parser changes.

    Here is summary of current parser code size

422345  HiveLexer.java
2436601  HiveParser.java
814184  HiveParser_FromClauseParser.java
2705920  HiveParser_IdentifiersParser.java
777665 HiveParser_SelectClauseParser.java

    After change, it will become

422345 HiveLexer.java
2253691 HiveParser.java
506224 HiveParser_FromClauseParser.java
2108342 HiveParser_IdentifiersParser.java
363665 HiveParser_SelectClauseParser.java

    Thanks.

Best
Pengcheng

Re: [DISCUSSION] Deprecate HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS

Posted by Ashutosh Chauhan <as...@gmail.com>.
- By default config, these words are treated as reserved, so user will get
exception if they try to use these words.
- User can change behavior but only by taking explicit action of changing
config.
- It was release noted.
- We have done 3 releases since this was introduced.

So my assertion would be that users should not be surprised by this. They
must have faced this and acknowledged this change already. So making this
change should not catch users off-guard.

Thanks,
Ashutosh

On Mon, Oct 3, 2016 at 6:09 PM, Alan Gates <al...@gmail.com> wrote:

> Have we warned users in current and previous releases that this may
> change?  We can’t put in a backwards incompatible changes without giving
> users some amount of time to adapt.
>
> Alan.
>
> > On Sep 30, 2016, at 20:52, Pengcheng Xiong <px...@apache.org> wrote:
> >
> > Hi all,
> >
> >    I logged HIVE-14872 <https://issues.apache.org/jira/browse/HIVE-14872>
> to
> > deprecate the configuration of HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS. The
> > main purpose for the configuration of HIVE_SUPPORT_SQL11_RESERVED_
> KEYWORDS
> > is for backward compatibility (See HIVE-6617) because a lot of reserved
> key
> > words have been used as identifiers in the previous releases. We already
> > have had several releases with this configuration.
> >
> >    Now when I tried to add new set operators to the parser, ANTLR is
> > always complaining "code too large". I think it is time to remove this
> > configuration. (1) It will simplify the parser logic and largely reduce
> the
> > size of generated parser code; (2) it leave space for new features,
> > especially those which require parser changes.
> >
> >    Here is summary of current parser code size
> >
> > 422345  HiveLexer.java
> > 2436601  HiveParser.java
> > 814184  HiveParser_FromClauseParser.java
> > 2705920  HiveParser_IdentifiersParser.java
> > 777665 HiveParser_SelectClauseParser.java
> >
> >    After change, it will become
> >
> > 422345 HiveLexer.java
> > 2253691 HiveParser.java
> > 506224 HiveParser_FromClauseParser.java
> > 2108342 HiveParser_IdentifiersParser.java
> > 363665 HiveParser_SelectClauseParser.java
> >
> >    Thanks.
> >
> > Best
> > Pengcheng
>
>

Re: [DISCUSSION] Deprecate HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS

Posted by Alan Gates <al...@gmail.com>.
Have we warned users in current and previous releases that this may change?  We can’t put in a backwards incompatible changes without giving users some amount of time to adapt.

Alan.

> On Sep 30, 2016, at 20:52, Pengcheng Xiong <px...@apache.org> wrote:
> 
> Hi all,
> 
>    I logged HIVE-14872 <https://issues.apache.org/jira/browse/HIVE-14872> to
> deprecate the configuration of HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS. The
> main purpose for the configuration of HIVE_SUPPORT_SQL11_RESERVED_KEYWORDS
> is for backward compatibility (See HIVE-6617) because a lot of reserved key
> words have been used as identifiers in the previous releases. We already
> have had several releases with this configuration.
> 
>    Now when I tried to add new set operators to the parser, ANTLR is
> always complaining "code too large". I think it is time to remove this
> configuration. (1) It will simplify the parser logic and largely reduce the
> size of generated parser code; (2) it leave space for new features,
> especially those which require parser changes.
> 
>    Here is summary of current parser code size
> 
> 422345  HiveLexer.java
> 2436601  HiveParser.java
> 814184  HiveParser_FromClauseParser.java
> 2705920  HiveParser_IdentifiersParser.java
> 777665 HiveParser_SelectClauseParser.java
> 
>    After change, it will become
> 
> 422345 HiveLexer.java
> 2253691 HiveParser.java
> 506224 HiveParser_FromClauseParser.java
> 2108342 HiveParser_IdentifiersParser.java
> 363665 HiveParser_SelectClauseParser.java
> 
>    Thanks.
> 
> Best
> Pengcheng