| 34 | namespace graph { |
| 35 | |
| 36 | static std::vector<column_id_t> getColumnIDs(const expression_vector& propertyExprs, |
| 37 | const TableCatalogEntry& relEntry, const std::vector<column_id_t>& propertyColumnIDs) { |
| 38 | auto columnIDs = std::vector{NBR_ID_COLUMN_ID}; |
| 39 | for (auto columnID : propertyColumnIDs) { |
| 40 | columnIDs.push_back(columnID); |
| 41 | } |
| 42 | for (const auto& expr : propertyExprs) { |
| 43 | auto& property = expr->constCast<PropertyExpression>(); |
| 44 | if (property.hasProperty(relEntry.getTableID())) { |
| 45 | columnIDs.push_back(relEntry.getColumnID(property.getPropertyName())); |
| 46 | } else { |
| 47 | columnIDs.push_back(INVALID_COLUMN_ID); |
| 48 | } |
| 49 | } |
| 50 | return columnIDs; |
| 51 | } |
| 52 | |
| 53 | static expression_vector getProperties(std::shared_ptr<Expression> expr) { |
| 54 | if (expr == nullptr) { |
no test coverage detected