Skip to content

Reification hooks and tests#72

Merged
xllora merged 7 commits into
google:masterfrom
apr94:reification_hooks
May 30, 2017
Merged

Reification hooks and tests#72
xllora merged 7 commits into
google:masterfrom
apr94:reification_hooks

Conversation

@apr94
Copy link
Copy Markdown
Contributor

@apr94 apr94 commented May 30, 2017

With this PR, construct clauses can be fully expressed via the Statement struct.

Copy link
Copy Markdown
Member

@xllora xllora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits.

Comment thread bql/grammar/grammar_test.go Outdated
}
p, err := NewParser(SemanticBQL())
if err != nil {
t.Errorf("grammar.NewParser: should have produced a valid BQL parser, %v", err)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grammar.NewParser: Should have produced a valid BQL parser

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread bql/grammar/grammar_test.go Outdated
for _, entry := range table {
st := &semantic.Statement{}
if err := p.Parse(NewLLk(entry.query, 1), st); err != nil {
t.Errorf("Parser.consume: failed to accept valid semantic entry %q", entry.query)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parser.consume: Failed to accept valid semantic entry %q

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

?s1 "old_predicate_3"@[,] ?o3};`,
want_one: 2,
want_two: 2,
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please repeat the tests using temporal predicates.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@apr94 apr94 force-pushed the reification_hooks branch from 8a2c660 to c81a4b8 Compare May 30, 2017 20:17
Comment thread bql/grammar/grammar_test.go Outdated
"predicate_2"@[] ?o2;
"predicate_3"@[?t] ?o3} into ?a from ?b where {?s "old_predicate_1"@[,] ?o1.
?s "old_predicate_2"@[,] ?o2.
?s1 "old_predicate_3"@[?t] ?o3};`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?s1 "old_predicate_3"@[?t] ?o3

This is not a valid statement. The valid representation is by using the AT binding keyword. See the example below.

?s1 "old_predicate_3"@[,] AT ?t ?o3

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed this example.

@xllora
Copy link
Copy Markdown
Member

xllora commented May 30, 2017

Thanks!

@xllora xllora merged commit d6ca6c7 into google:master May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants