ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Goncharuk (Jira)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-14325) SQL COPY command: when conversion fails, the error does not contain information about line number and the failed value
Date Tue, 16 Mar 2021 16:02:00 GMT
Alexey Goncharuk created IGNITE-14325:
-----------------------------------------

             Summary: SQL COPY command: when conversion fails, the error does not contain
information about line number and the failed value
                 Key: IGNITE-14325
                 URL: https://issues.apache.org/jira/browse/IGNITE-14325
             Project: Ignite
          Issue Type: Improvement
    Affects Versions: 2.10
            Reporter: Alexey Goncharuk


I was trying to import data from a CSV file to Ignite cache through sqlline.

When a file contains a value that cannot be converted to the schema format, the error message
printed by the client is absolutely useless:

{code}
Error: Server error: class org.apache.ignite.internal.processors.query.IgniteSQLException:
Value conversion failed [column=PICKUP_DATETIME, from=java.lang.String, to=java.sql.Timestamp]
(state=50000,code=1)
java.sql.SQLException: Server error: class org.apache.ignite.internal.processors.query.IgniteSQLException:
Value conversion failed [column=PICKUP_DATETIME, from=java.lang.String, to=java.sql.Timestamp]
	at org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:1009)
	at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.sendFile(JdbcThinStatement.java:336)
	at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:243)
	at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:560)
	at sqlline.Commands.executeSingleQuery(Commands.java:1054)
	at sqlline.Commands.execute(Commands.java:1003)
	at sqlline.Commands.sql(Commands.java:967)
	at sqlline.SqlLine.dispatch(SqlLine.java:734)
	at sqlline.SqlLine.begin(SqlLine.java:541)
	at sqlline.SqlLine.start(SqlLine.java:267)
	at sqlline.SqlLine.main(SqlLine.java:206)
{code}

The server log does not contain any helpful information as well.

When input validation failed, we need to output the following context information:
 * Line number of the source file that triggered the error
 * A few values preceding the wrong column
 * The exact value that failed parse/conversion error
 * For complex types (such as date/timestamp), the acceptable input formats



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message