Skip to content

Commit

Permalink
fbcode/glean/
Browse files Browse the repository at this point in the history
Reviewed By: iahs

Differential Revision: D50818584

fbshipit-source-id: 1a9fcf5e8e1ff234f88ac300f1e340d0486a14f0
  • Loading branch information
generatedunixname226714639793621 authored and facebook-github-bot committed Nov 9, 2023
1 parent 8948452 commit 309e4b3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
31 changes: 22 additions & 9 deletions glean/if/glean.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct TaskWaiting {}

struct TaskRunning {
// ParcelState for parcels [0,1..n-1] where n is Recipe.parcels.
1: list<ParcelState> (hs.type = "Vector") parcels;
1: list_ParcelState_7430 parcels;
}

struct TaskFinished {
Expand Down Expand Up @@ -230,8 +230,8 @@ struct Fact {
}

struct FactDependencies {
1: list<Id> (hs.type = "VectorStorable") facts;
2: list<Id> (hs.type = "VectorStorable") dependencies;
1: list_Id_1857 facts;
2: list_Id_1857 dependencies;
}

// A collection of facts which can be written to a database.
Expand Down Expand Up @@ -260,7 +260,7 @@ struct Batch {
// - all elements are unique
// - ids are reasonably dense (writing the batch to the db will use a
// data structure of size O(max id - firstId))
4: optional list<i64> (hs.type = "VectorStorable") ids;
4: optional list_i64_7948 ids;

// (optional for now)
//
Expand All @@ -274,7 +274,7 @@ struct Batch {
//
// Units do not need to be declared beforehand; a Unit exists if
// it is the owner of at least one fact.
5: map<UnitName, listOfIds> (hs.type = "HashMap") owned;
5: map_UnitName_listOfIds_7119 owned;

// Specifies explicit dependencies of derived facts per predicate.
//
Expand All @@ -284,12 +284,12 @@ struct Batch {
// derive that fact.
//
// The dependency relation is used to determine ownership.
6: map<Id, list<FactDependencies>> (hs.type = "HashMap") dependencies;
6: map_Id_list_FactDependencies_964 dependencies;
}

struct Subst {
1: Id firstId;
2: list<i64> (hs.type = "VectorStorable") ids;
2: list_i64_7948 ids;
}

struct Error {
Expand Down Expand Up @@ -809,8 +809,8 @@ struct UserQueryResultsBin {

struct UserQueryResultsListBin {
1: UserQueryEncodingListBin encoding;
2: list<Id> (hs.type = "Vector") ids;
3: list<Fact> (hs.type = "Vector") facts;
2: list_Id_2029 ids;
3: list_Fact_2137 facts;
4: map<Id, Fact> nestedFacts;
}

Expand Down Expand Up @@ -1322,3 +1322,16 @@ struct PredicateAnnotation {
1: PredicateName name;
2: i32 version;
}

// The following were automatically generated and may benefit from renaming.
typedef list<Fact> (hs.type = "Vector") list_Fact_2137
typedef list<Id> (hs.type = "VectorStorable") list_Id_1857
typedef list<Id> (hs.type = "Vector") list_Id_2029
typedef list<ParcelState> (hs.type = "Vector") list_ParcelState_7430
typedef list<i64> (hs.type = "VectorStorable") list_i64_7948
typedef map<Id, list<FactDependencies>> (
hs.type = "HashMap",
) map_Id_list_FactDependencies_964
typedef map<UnitName, listOfIds> (
hs.type = "HashMap",
) map_UnitName_listOfIds_7119
5 changes: 4 additions & 1 deletion glean/if/internal.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace hs Glean

// The Schema stored in a DB
struct StoredSchema {
1: string (hs.type = "ByteString") schema;
1: string_321 schema;
2: map<glean.Id, glean.PredicateRef> predicateIds;

// We store the SchemaId corresponding to each all.version in the
Expand Down Expand Up @@ -105,3 +105,6 @@ struct SchemaIndex {
// Older versions of the schema we also know about
2: list<SchemaInstance> older;
}

// The following were automatically generated and may benefit from renaming.
typedef string (hs.type = "ByteString") string_321

0 comments on commit 309e4b3

Please sign in to comment.