提交 ffd27259 编写于 作者: dengyihao's avatar dengyihao

add backend

上级 78f22d71
......@@ -747,15 +747,24 @@ int32_t streamStateFillGetKVByCur_rocksdb(SStreamStateCur* pCur, SWinKey* pKey,
return -1;
}
SWinKey winKey;
SWinKey* pKTmp = &winKey;
if (rocksdb_iter_valid(pCur->iter)) {
size_t tlen;
char* keyStr = (char*)rocksdb_iter_key(pCur->iter, &tlen);
winKeyDecode(&winKey, keyStr);
size_t vlen = 0;
const char* valStr = rocksdb_iter_value(pCur->iter, &vlen);
if (pVal != NULL) {
char* dst = taosMemoryCalloc(1, vlen);
memcpy(dst, valStr, vlen);
*pVal = dst;
}
if (pVLen != NULL) *pVLen = vlen;
} else {
return -1;
}
*pKey = *pKTmp;
*pKey = winKey;
return 0;
}
int32_t streamStateGetGroupKVByCur_rocksdb(SStreamStateCur* pCur, SWinKey* pKey, const void** pVal, int32_t* pVLen) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册