[ https://issues.apache.org/jira/browse/HIVE-5672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14509927#comment-14509927 ]
Sushanth Sowmyan commented on HIVE-5672: ---------------------------------------- Agree with Xuefu - the grammar might be simplified by simply making KW_LOCAL optional, since there is no other place in hive code that seems to be making use of TOK_LOCAL_DIR. To wit, we could have : {code} KW_LOCAL? KW_DIRECTORY StringLiteral tableRowFormat? tableFileFormat? -> ^(TOK_DIR StringLiteral tableRowFormat? tableFileFormat?) {code} This does mean that if at some point, we do still want to have a differentiation between local and non-local writes, we have to go back to Nemon's approach, and his approach is definitely the "least damage done" approach of not trying to remove something that already exists, so his patch makes sense from that point-of-view. We have two approaches here, and I'm +1 on both: a) Nemon's approach b) Xuefu's suggestion : to make KW_LOCAL optional, and then emiting a TOK_DIR instead of a TOK_LOCAL_DIR for that line, and removing any other occurrences of TOK_LOCAL_DIR. We might eventually add it back because we want it, but it's duplicate code pruning in the meanwhile. > Insert with custom separator not supported for non-local directory > ------------------------------------------------------------------ > > Key: HIVE-5672 > URL: https://issues.apache.org/jira/browse/HIVE-5672 > Project: Hive > Issue Type: Bug > Affects Versions: 0.12.0, 1.0.0 > Reporter: Romain Rigaux > Assignee: Nemon Lou > Attachments: HIVE-5672.1.patch, HIVE-5672.2.patch, HIVE-5672.3.patch, > HIVE-5672.4.patch, HIVE-5672.5.patch, HIVE-5672.5.patch.tar.gz > > > https://issues.apache.org/jira/browse/HIVE-3682 is great but non local > directory don't seem to be supported: > {code} > insert overwrite directory '/tmp/test-02' > row format delimited > FIELDS TERMINATED BY ':' > select description FROM sample_07 > {code} > {code} > Error while compiling statement: FAILED: ParseException line 2:0 cannot > recognize input near 'row' 'format' 'delimited' in select clause > {code} > This works (with 'local'): > {code} > insert overwrite local directory '/tmp/test-02' > row format delimited > FIELDS TERMINATED BY ':' > select code, description FROM sample_07 > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)