Closed archipelweb closed 1 year ago
Please amend the commit with passing DCO (git commit -s --amend
).
Is there some kind of test we can write to exercise this?
We done the commit
to validate this modification:
/*
load client with credentials
*/
$request="SELECT * FROM `my-index`";
$params=['query' => $request];
$result = $client->sql()->query($params);
the return:
"schema": [
{
"name": "date",
"type": "text"
}
]
"datarows": [
[
"2023-05-31 09:18:38",
]
],
"total": 1,
"size": 1,
"status": 200
/*
load client with credentials
*/
$params=['query' => $request];
$params['format']='json';
$result = $client->sql()->query($params);
the return:
{
"took": 9,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 1,
"hits": [
{
"_index": "my-index",
"_id": "123456789",
"_score": 1,
"_source": {
"date": "2023-05-31 09:18:38"
}
}
]
}
}
Merging #156 (0eb1482) into main (8b6cdbc) will not change coverage. The diff coverage is
0.00%
.
@@ Coverage Diff @@
## main #156 +/- ##
=========================================
Coverage 24.14% 24.14%
Complexity 1937 1937
=========================================
Files 246 246
Lines 6863 6863
=========================================
Hits 1657 1657
Misses 5206 5206
Impacted Files | Coverage Δ | |
---|---|---|
src/OpenSearch/Endpoints/Sql/Query.php | 66.66% <0.00%> (ø) |
Sorry dblock, We are some developers not used to the world of open source contributions... Initially, we only just wanted to suggest this small improvement, by showing you what it could bring, and we have try to provide you some details to help you (as we can) to integrate it... But right now, we can't do much better, sorry.. Is it not possible for you to "properly" integrate this small evolution (if you judge it relevant) into the project, by yourself ? Thanks you.
I think it's a great small change! Without tests the feature can break quietly, and I am sure you wouldn't like that suddenly a future release gets cut and your added feature is broken! If you have time to finish this PR, thank you, if not let's hope someone picks it up from where you left it off. Thanks for getting it this far.
I was so kind and have extended it with tests in a new PR #161. This is a nice feature to have, thank you @archipelweb for beginning this feature.
I was so kind and have extended it with tests
Yeah, @CSalih that's really kind ! Tank you very much for this. We are grateful !
Closing after https://github.com/opensearch-project/opensearch-php/pull/161 was merged. Thank @archipelweb and @CSalih for contributing!
Description
Allow to use a format parameter for sql plugin
Issues Resolved
155