epfldata / sc-public

Example DSLs for working with SC
22 stars 9 forks source link

relation-dsl: relationProject oddity #12

Closed SolalPirelli closed 8 years ago

SolalPirelli commented 8 years ago

In RelationLowering, relationProject is called with the same argument for the old and new schema; was the 3rd argument here meant to be schema1?

Also, in RecordsLowering, it appears the code is completely ignoring the new schema and simply copying every tuple, which seems to defeat the purpose of a projection...?

LPTK commented 8 years ago

This is a minor oversight on our side: there should only be one Schema parameter to the relationProject function: the final schema. Currently, we pass the final schema twice. So the code in RecordsLowering that uses the first Schema parameter behaves correctly, and is in fact doing a rightful projection (you can verify this by running pgrmA).