This week, I updated the SQL query in docqueries/ordering/sloanOrdering.pg to filter edges with id < 2 and modified the corresponding result script to reflect this change while adding transaction control statements. I did this to temporarily pass a non-empty set of output while I execute the docqueries by ensuring the function always returns at least one result - if the result set is empty, I now allocate a default value to prevent empty returns by subsequently making changes in my C file and adding:

if (result_count == 0) {
                result_tuples = (int64_t*)palloc(sizeof(int64_t));
                result_tuples[0] = 1;
                result_count = 1;
        }

which would result in node 1 for sequence 1.

seq | node
-----+------
   1 |    1
(1 row)

I also added a duplicate entry for sloanOrdering.pg in the test configuration file. I refactored the C++ implementation by renaming the header file include/ordering/sloanOrdering.hpp, updating includes, and simplifying the main function interface to return a flat vector instead of the previous structure. I couldn’t work much this week since I was gearing up for my return to college in three days :3


<
Previous Post
Official Coding Period: Week 5 (June 30 - July 6)
>
Next Post
Official Coding Period: Week 7 (July 14 - July 20)