IBM Support

JR62512: HIVE CONNECTOR FAILS TO PARSE SELECT STATEMENT THAT HAS NEW LINES ANYWHERE BUT THE FROM STATEMENT

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • In the Hive Conenctor if SELECT statement contains new lines
    anywhere but within the vicinity of the FROM keyword then
    parsing will fail on partition read.
    
    As an example:
    
    Will
    succeed:
    SELECT col1, col2, col3
    FROM
    mytable WHERE part_num>0
    and ( part_num=[[part-value]] );
    
    Will fail:
    SELECT
    col1,
    
    col2,
    col3
    FROM
    mytable WHERE part_num>0 and (
    part_num=[[part-value]] );
    
    The error message thrown
    is:
    
    [IBM][Hive JDBC Driver][Hive]Error while compiling
    statement: FAILED: ParseException line 1:15 cannot recognize
    input near '<EOF>' '<EOF>' '<EOF>' in table name
    

Local fix

  • Remove unnecessary new lines.
    

Problem summary

  • Hive Connector configured to read data using a user-provided
    multi-line SELECT statement in parallel using the partitioned
    read method 'Hive partition' aborts with error:
    [SQLSTATE 42000] java.sql.SQLSyntaxErrorException: [IBM][Hive
    JDBC Driver] [Hive]Error while compiling statement: FAILED:
    ParseException line 1:15 cannot recognize input near '<EOF>'
    '<EOF>' '<EOF>' in table name.
    The error occurs when the connector attempts to get the source
    table partition details from Hive database, because the
    statement is missing the table name.
    The root cause of the problem is the inability to find the table
    name in the SELECT statement if the statement is formatted in
    mulitple lines and new line characters appear anywhere but right
    before or after the FROM keyword.
    

Problem conclusion

  • The regular expression used to determine the table name from the
     user-defined SELECT statement has been updated to handle
    multi-line statements correctly.
    

Temporary fix

  • Change the SELECT statement formatting - remove line terminator
    characters
    

Comments

APAR Information

  • APAR number

    JR62512

  • Reported component name

    INFO SRVR PLATF

  • Reported component ID

    5724Q3612

  • Reported release

    B70

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-07-03

  • Closed date

    2020-07-09

  • Last modified date

    2020-07-09

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    INFO SRVR PLATF

  • Fixed component ID

    5724Q3612

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZJPZ","label":"IBM InfoSphere Information Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.7","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
10 July 2020