Open FreedomBX opened 8 years ago
test again,not start with number,but start with [0-9]e(scientific notation),the error will be occured.
show the select please
select * from 5ed516e548a8458c825ec3655127cd46,any index which start with number + 'e' + any string
当你的表名以数字开头的时候,在Sql识别的时候会出现异常。
但是elasticsearch的index是可以以数字开头的,而且这个不是数字开头的问题,正常数字开头是可以的,只是在写成科学计数法的时候会认为这是个数字,导致错误
The error happened cause com.alibaba.druid.sql.parser.Lexer
thought 'number' + 'e' was decimalValue. Can you just make a alias name for the index which you query?
Update: note that this is a bug in druid library which is open source project for jdbc datasource. Maybe we can check the latest version to make sure whether the issue has been fixed.
There is a workaround for your issue
SELECT * FROM ['5ed516e548a8458c825ec3655127cd46']
I select * from one index which start with number + 'e' , like uuid(5ed516e548a8458c825ec3655127cd46), then { "error" : { "root_cause" : [ { "type" : "number_format_exception", "reason" : null } ], "type" : "number_format_exception", "reason" : null }, "status" : 400 } return
why?