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

Stefania commented on CASSANDRA-12174:
--------------------------------------

LGTM now, thank you! 

I only have one suggestion, which is in the case where the glob expression 
doesn't match any file, it should error out with "Can't open %r for reading: no 
matching file found"  rather than "Can't open %r for reading: file does not 
exist".

I've applied your patch plus this minor change to a new branch and launched the 
tests:

||trunk||
|[patch|https://github.com/stef1927/cassandra/commits/12174-cqlsh]|
|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12174-cqlsh-cqlsh-tests/]|

If the tests are OK we can commit this.

> COPY FROM should raise error for non-existing input files
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-12174
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12174
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Stefan Podkowinski
>            Assignee: Hiroyuki Nishi
>            Priority: Minor
>              Labels: lhf
>         Attachments: CASSANDRA-12174-trunk.patch
>
>
> Currently the CSV COPY FROM command will not raise any error for non-existing 
> paths. Instead only "0 rows imported" will be shown as result. 
> As the COPY FROM command is often used for tutorials and getting started 
> guides, I'd suggest to give a clear error message in case of a missing input 
> file. Without such error it can be confusing for the user to see the command  
> actually finish, without any clues why no rows have been imported.
> {noformat}
> CREATE KEYSPACE test
>   WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 1 
> };
> USE test;
> CREATE TABLE airplanes (
>   name text PRIMARY KEY,
>   manufacturer ascii,
>   year int,
>   mach float
> );
> COPY airplanes (name, manufacturer, year, mach) FROM '/tmp/1234-doesnotexist';
> Using 3 child processes
> Starting copy of test.airplanes with columns [name, manufacturer, year, mach].
> Processed: 0 rows; Rate:       0 rows/s; Avg. rate:       0 rows/s
> 0 rows imported from 0 files in 0.216 seconds (0 skipped).
> {noformat}



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

Reply via email to