breck7 / pldb

PLDB: a Programming Language DataBase
https://pldb.io
729 stars 99 forks source link

What are computer columns ? #393

Closed ghost closed 1 year ago

ghost commented 1 year ago

Pldb source seems to have a concept called computed columns. I don't seem to understand what it is.

Is it simply what shows up in https://build.pldb.com/edit/LANGUAGE_PAGE as Missing columns ?

breck7 commented 1 year ago

Good question! Computed columns are numbers that appear in the CSVs but don't appear hard coded in the *.pldb files. They are derived/computed by the code. We don't have too many of them yet, things like languageRank and lastActivity, but I could see us adding more in the future. They are just there to make live easier for analysts who otherwise would often repeat themselves adding basic computed columns.

I just made it so that the "Definition" column on the CSV documentation page (https://pldb.com/docs/csv.html) includes a link to the function in TypeScript where the column is generated:

Screen Shot 2023-01-16 at 3 28 07 AM