mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
jshook/nosqlbench-2055-mapfix2 (#2144)
* HOF component funcs inherit default input type from parent * minor fixes to test * fix for preview action syntax
This commit is contained in:
parent
54a3569ce5
commit
c0db7a195a
44
.github/workflows/preview.yml
vendored
44
.github/workflows/preview.yml
vendored
@ -207,30 +207,30 @@ jobs:
|
||||
echo "PREVIEW_VERSION=${{ needs.preview-build.outputs.preview_version }}" >> $GITHUB_ENV
|
||||
echo "DOCKER_TAGS=${{ needs.preview-build.outputs.docker_tags }}" >> $GITHUB_ENV
|
||||
|
||||
- name: checkout build docs
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: nosqlbench/nosqlbench-build-docs
|
||||
path: build-docs
|
||||
- name: checkout build docs
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: nosqlbench/nosqlbench-build-docs
|
||||
path: build-docs
|
||||
|
||||
- name: download exported_docs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: exported-docs
|
||||
path: build-docs
|
||||
- name: download exported_docs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: exported-docs
|
||||
path: build-docs
|
||||
|
||||
- name: overlay docs changes and push
|
||||
run: |
|
||||
set -x
|
||||
cd build-docs
|
||||
./doimport.sh
|
||||
rm exported_docs.zip
|
||||
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||
git add .
|
||||
git tag -f ${{ env.PREVIEW_VERSION }}
|
||||
git commit -m"docs update for ${{ env.PREVIEW_VERSION }}"
|
||||
git push
|
||||
- name: overlay docs changes and push
|
||||
run: |
|
||||
set -x
|
||||
cd build-docs
|
||||
./doimport.sh
|
||||
rm exported_docs.zip
|
||||
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||
git add .
|
||||
git tag -f ${{ env.PREVIEW_VERSION }}
|
||||
git commit -m"docs update for ${{ env.PREVIEW_VERSION }}"
|
||||
git push
|
||||
|
||||
javadocs:
|
||||
needs: preview-docs
|
||||
|
@ -117,9 +117,11 @@ public class VirtDataComposer {
|
||||
|
||||
for (int pos = 0; pos <fargs.length; pos++) { // Resolve functions recursively if needed
|
||||
Object param = fargs[pos];
|
||||
if (param instanceof FunctionCall) {
|
||||
|
||||
List<ResolvedFunction> resolvedAt = resolve(diagnostics, (FunctionCall) param, cconfig);
|
||||
if (param instanceof FunctionCall innerFcall) {
|
||||
if (innerFcall.getInputType()==null) {
|
||||
innerFcall.setInputType(fcall.getInputType());
|
||||
}
|
||||
List<ResolvedFunction> resolvedAt = resolve(diagnostics, innerFcall, cconfig);
|
||||
Object[] pfuncs = new Object[resolvedAt.size()];
|
||||
for (int pfunc = 0; pfunc < pfuncs.length; pfunc++) {
|
||||
pfuncs[pfunc]=resolvedAt.get(pfunc).getFunctionObject();
|
||||
@ -167,6 +169,11 @@ public class VirtDataComposer {
|
||||
|
||||
for (int i = flow.getExpressions().size() - 1; i >= 0; i--) {
|
||||
FunctionCall call = flow.getExpressions().get(i).getCall();
|
||||
if (flow.getExpressions().size()==1) {
|
||||
if (call.getInputType()==null) {
|
||||
call.setInputType("long");
|
||||
}
|
||||
}
|
||||
|
||||
diagnostics.trace("FUNCTION[" + i + "]: " + call.toString() + ", resolving args");
|
||||
|
||||
@ -306,7 +313,8 @@ public class VirtDataComposer {
|
||||
* @param funcs the list of candidate functions offered at each phase, in List<List> form.
|
||||
* @return a List of resolved functions that has been fully optimized
|
||||
*/
|
||||
private List<ResolvedFunction> optimizePath(List<List<ResolvedFunction>> funcs, Class<?> type) {
|
||||
public List<ResolvedFunction> optimizePath(List<List<ResolvedFunction>> funcs,
|
||||
Class<?> type) {
|
||||
List<ResolvedFunction> prevFuncs = null;
|
||||
List<ResolvedFunction> nextFuncs = null;
|
||||
int progress = -1;
|
||||
@ -345,12 +353,18 @@ public class VirtDataComposer {
|
||||
progress += reduceByPreferredResultTypes(funcs.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
for (List<ResolvedFunction> func : funcs) {
|
||||
func.sort(ResolvedFunction.PREFERRED_TYPE_COMPARATOR);
|
||||
}
|
||||
|
||||
List<ResolvedFunction> optimized = funcs.stream().map(l -> l.get(0)).collect(Collectors.toList());
|
||||
|
||||
return optimized;
|
||||
}
|
||||
|
||||
private int reduceByRequiredResultsType(List<ResolvedFunction> endFuncs, Class<?> resultType) {
|
||||
public int reduceByRequiredResultsType(List<ResolvedFunction> endFuncs,
|
||||
Class<?> resultType) {
|
||||
int progressed = 0;
|
||||
LinkedList<ResolvedFunction> tmpList = new LinkedList<>(endFuncs);
|
||||
for (ResolvedFunction endFunc : tmpList) {
|
||||
|
@ -65,7 +65,8 @@ class ExitStatusIntegrationTests {
|
||||
|
||||
// Forcing a thread exception via basic command issue.
|
||||
ProcessResult result = invoker.run("exitstatus_threadexception", 30,
|
||||
"java", "--enable-preview", "-jar", JARNAME, "--logs-dir", "logs/test/threadexcep", "--logs-level",
|
||||
java, "--enable-preview", "-jar", JARNAME, "--logs-dir", "logs/test/threadexcep",
|
||||
"--logs-level",
|
||||
"debug", "run",
|
||||
"driver=diag", "cyclerate=10", "not_a_thing", "cycles=100", "-vvv"
|
||||
);
|
||||
@ -79,7 +80,8 @@ class ExitStatusIntegrationTests {
|
||||
ProcessInvoker invoker = new ProcessInvoker();
|
||||
invoker.setLogDir("logs/test");
|
||||
ProcessResult result = invoker.run("exitstatus_asyncstoprequest", 60,
|
||||
"java", "--enable-preview", "-jar", JARNAME, "--logs-dir", "logs/test/asyncstop", "--logs-level", "debug", "run",
|
||||
java, "--enable-preview", "-jar", JARNAME, "--logs-dir", "logs/test/asyncstop",
|
||||
"--logs-level", "debug", "run",
|
||||
"driver=diag", "threads=2", "cyclerate=10", "op=erroroncycle:erroroncycle=10", "cycles=50", "-vvv"
|
||||
);
|
||||
assertThat(result.exception).isNull();
|
||||
|
Loading…
Reference in New Issue
Block a user