Closed ahsank closed 2 years ago
Last commit in this PR https://github.com/futurewei-cloud/chogori-opengauss/pull/23/commits/ce3671c1431ff21dc982aaf35c9398aed2abfcd5 has the changes made to compile.
@johnfangAFW The code in catalog folder includes files from common and entities , for example in https://github.com/futurewei-cloud/chogori-sql/blob/master/src/k2/connector/pggate/catalog/sql_catalog_manager.h . What to do about them? Should I rewrite the code so that it doesn't use entities or common header?
#include "common/status.h"
#include "entities/entity_ids.h"
#include "entities/schema.h"
#include "entities/index.h"
#include "entities/table.h"
#include "pggate/k2_adapter.h"
@johnfangAFW The code in catalog folder includes files from common and entities , for example in https://github.com/futurewei-cloud/chogori-sql/blob/master/src/k2/connector/pggate/catalog/sql_catalog_manager.h . What to do about them? Should I rewrite the code so that it doesn't use entities or common header?
#include "common/status.h" #include "entities/entity_ids.h" #include "entities/schema.h" #include "entities/index.h" #include "entities/table.h" #include "pggate/k2_adapter.h"
Yes, some of the classes will be replaced by new ones. For now, you should copy over the classes that are really used in catalog manager, we will refactor these classes later. Please remove all the files that are actually used in catalog manager.
@johnfangAFW I removed about 50 files and deleted bunch of code. Check if more files can be removed. The main problem I am having now that if I use header files from storage/access/k2
for example result.h
instead of one copied from chogori-sql, DCHECK macro is not compiling. I am investigating it.
@johnfangAFW I removed about 50 files and deleted bunch of code. Check if more files can be removed. The main problem I am having now that if I use header files from
storage/access/k2
for exampleresult.h
instead of one copied from chogori-sql, DCHECK macro is not compiling. I am investigating it.
Please rebase against mainline, Justin pushed a commit and removed the result.h and the slice.h. Please use the latest header files from access/k2. Thanks.
I just synced and the result.h seems to be deleted. @jfunston catalog code uses entity_ids.h and result.h for example https://github.com/futurewei-cloud/chogori-opengauss/blob/3f54532d2d0ccc4f39e15bd1153e5fd7cdea0484/src/gausskernel/storage/k2/entities/entity_ids.h#L62 Shall I keep using result.h from in my copy of chogori-sql or there is similar definition elsewhere.
We don't want the chogori-sql result.h if we can avoid it. Can you try to implement your own as a simple struct? It should contain a templated value and a K2PgStatus which I implemented in access/k2/status.h. Let me know if you run into a problem with that approach.
Still in development. It compiles now but some code is commented and need to resolve duplicate symbol error during linking as some functions seem to be already in opengauss. Also need to test.