-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
Description
Elasticsearch version (6.3):
Plugins installed: [_xpack]
JVM version (1.8.0_161-b14):
OS version (Linux 3.10.0-327.10.1.el7.x86_64):
Description of the problem including expected versus actual behavior:
Got sql_illegal_argument_exception when getting data from elastic search using _xpack/sql.
uri: http://${host}/_xpack/sql?format=json
SQL:
select created_at, device_id from table1 where created_at > 1527982201597 AND user_id = '12345678'
Error:
Steps to reproduce:
- use the code (js) below to post a request.
let options = {
method: 'POST',
uri: `http://${hosts}/_xpack/sql?format=json`,
body: {"query": `select created_at, device_id from table1 where created_at > 1527982201597 AND user_id = '12345678'`},
json: true
};
return rp(options);
- Got exception in the result.
The created_at is date type and1527982201597is milliseconds.
Provide logs (if relevant):
{ error:
{ root_cause: [ [Object] ],
type: 'sql_illegal_argument_exception',
reason: '[1527982201597] out of [Int] range' },
status: 500
}