Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always parse language tag. #3243

Merged
merged 3 commits into from
Apr 2, 2019
Merged

Always parse language tag. #3243

merged 3 commits into from
Apr 2, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Apr 1, 2019

Currently, the language tag is only being parsed if the value is a
string, which lead to issues in a different PR.
This change makes it so that the language tag is always parsed.


This change is Reviewable

Currently, the language tag is only being parsed if the value is a
string, which lead to issues in a different PR.
This change makes it so that the language tag is always parsed.
@martinmr martinmr requested a review from a team April 1, 2019 23:32
chunker/json/parse.go Outdated Show resolved Hide resolved
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

LGTM. Get someone to review and approve this change.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @martinmr)

Copy link

@gitlw gitlw left a comment

Choose a reason for hiding this comment

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

when do we need to parse the lang tag when the predicate is not a string, i.e. what's the issue?

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @martinmr)


chunker/json/parse.go, line 257 at r2 (raw file):

		}

		if op == DeleteNquads {

Is this blocking doing the same thing as the block below starting at line 292?

Copy link
Contributor Author

@martinmr martinmr left a comment

Choose a reason for hiding this comment

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

Predicate can be null, indicating a S P * deletion. Language tags were not being properly parsed in that case, which came up because I made a change to support delete triples of the format <uid> <pred@lang> * .

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @gitlw and @golangcibot)


chunker/json/parse.go, line 264 at r1 (raw file):

Previously, golangcibot (Bot from GolangCI) wrote…

File is not goimports-ed (from goimports)

Done.


chunker/json/parse.go, line 257 at r2 (raw file):

Previously, gitlw (Lucas Wang) wrote…

Is this blocking doing the same thing as the block below starting at line 292?

Looks like it. I have removed the second block.

@martinmr martinmr requested a review from gitlw April 2, 2019 21:16
Copy link

@gitlw gitlw left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @gitlw and @golangcibot)

@martinmr martinmr merged commit 313d823 into master Apr 2, 2019
@martinmr martinmr deleted the martinmr/json-nquad-lang branch April 2, 2019 21:56
@martinmr martinmr restored the martinmr/json-nquad-lang branch April 5, 2019 00:50
@martinmr martinmr deleted the martinmr/json-nquad-lang branch April 5, 2019 00:51
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
Currently, the language tag is only being parsed if the value is a
string, which lead to issues in a different PR.
This change makes it so that the language tag is always parsed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants