-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL: supplement input checks on received request parameters #52229
SQL: supplement input checks on received request parameters #52229
Conversation
This commit adds two necessary verifications on received parameters: - it checks the validity of the parameter's data type: if the declared data type is resolved to an ES or Java type; - it checks if the returned converter is non-null (i.e. a conversion is possible) and generates an appropriate exception otherwise.
Pinging @elastic/es-search (:Search/SQL) |
Remove unused "import" resulted from incorrect master merging into current branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -129,7 +129,8 @@ | |||
|
|||
import static java.util.Collections.emptyList; | |||
import static java.util.Collections.singletonList; | |||
import static org.elasticsearch.xpack.ql.type.DataTypeConverter.converterFor; | |||
import static org.elasticsearch.xpack.sql.type.SqlDataTypeConverter.canConvert; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…52229) * Add more checks around parameter conversions This commit adds two necessary verifications on received parameters: - it checks the validity of the parameter's data type: if the declared data type is resolved to an ES or Java type; - it checks if the returned converter is non-null (i.e. a conversion is possible) and generates an appropriate exception otherwise. (cherry picked from commit eda30ac)
…52277) * Add more checks around parameter conversions This commit adds two necessary verifications on received parameters: - it checks the validity of the parameter's data type: if the declared data type is resolved to an ES or Java type; - it checks if the returned converter is non-null (i.e. a conversion is possible) and generates an appropriate exception otherwise. (cherry picked from commit eda30ac)
…52276) * SQL: supplement input checks on received request parameters (#52229) * Add more checks around parameter conversions This commit adds two necessary verifications on received parameters: - it checks the validity of the parameter's data type: if the declared data type is resolved to an ES or Java type; - it checks if the returned converter is non-null (i.e. a conversion is possible) and generates an appropriate exception otherwise. (cherry picked from commit eda30ac)
This PR adds two necessary verifications on received parameters:
data type is resolved to an ES or Java type;
possible) and generates an appropriate exception otherwise.