{"action":"created","issue":{"url":"https://api.github.com/repos/blazegraph/database/issues/100","repository_url":"https://api.github.com/repos/blazegraph/database","labels_url":"https://api.github.com/repos/blazegraph/database/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/blazegraph/database/issues/100/comments","events_url":"https://api.github.com/repos/blazegraph/database/issues/100/events","html_url":"https://github.com/blazegraph/database/issues/100","id":347530427,"node_id":"MDU6SXNzdWUzNDc1MzA0Mjc=","number":100,"title":"SPARQL Update produces \"BigdataValue not available\" exception on integers","user":{"login":"smalyshev","id":155000,"node_id":"MDQ6VXNlcjE1NTAwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/155000?v=4","gravatar_id":"","url":"https://api.github.com/users/smalyshev","html_url":"https://github.com/smalyshev","followers_url":"https://api.github.com/users/smalyshev/followers","following_url":"https://api.github.com/users/smalyshev/following{/other_user}","gists_url":"https://api.github.com/users/smalyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/smalyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smalyshev/subscriptions","organizations_url":"https://api.github.com/users/smalyshev/orgs","repos_url":"https://api.github.com/users/smalyshev/repos","events_url":"https://api.github.com/users/smalyshev/events{/privacy}","received_events_url":"https://api.github.com/users/smalyshev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-03T20:43:49Z","updated_at":"2018-08-04T00:25:36Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This SPARQL statement:\r\n\r\n```\r\nprefix mediawiki: <https://www.mediawiki.org/ontology#>\r\n# Changes\r\nDELETE {\r\n?category ?x ?y\r\n} INSERT {\r\n\r\n<https://es.wikipedia.org/wiki/foo1> a mediawiki:Category ;\r\n        mediawiki:subcategories 0 .\r\n\r\n} WHERE {\r\n   VALUES ?category {\r\n     <https://es.wikipedia.org/wiki/foo2>\r\n   }\r\n};\r\n# Changes\r\nDELETE {\r\n?category ?x ?y\r\n} INSERT {\r\n\r\n<https://es.wikipedia.org/wiki/foo3> a mediawiki:Category ;\r\n        mediawiki:subcategories 0 .\r\n\r\n} WHERE {\r\n   VALUES ?category {\r\n     <https://es.wikipedia.org/wiki/foo4>\r\n   }\r\n};\r\n```\r\nProduces an exception:\r\n```\r\nCaused by: java.lang.AssertionError: BigdataValue not available: ConstantNode(XSDInteger(0)), term.iv=XSDInteger(0)\r\n        at com.bigdata.rdf.sparql.ast.eval.ASTConstructIterator.getValue(ASTConstructIterator.java:905)\r\n        at com.bigdata.rdf.sparql.ast.eval.ASTConstructIterator.makeStatement(ASTConstructIterator.java:831)\r\n        at com.bigdata.rdf.sparql.ast.eval.ASTConstructIterator.<init>(ASTConstructIterator.java:268)\r\n        at com.bigdata.rdf.sparql.ast.eval.AST2BOpUpdate.convertDeleteInsert(AST2BOpUpdate.java:918)\r\n        at com.bigdata.rdf.sparql.ast.eval.AST2BOpUpdate.convertUpdateSwitch(AST2BOpUpdate.java:443)\r\n        at com.bigdata.rdf.sparql.ast.eval.AST2BOpUpdate.convertUpdate(AST2BOpUpdate.java:293)\r\n        ... 10 more\r\n```\r\n\r\nLooks like some bug in DELETE/INSERT parsing integers?"},"comment":{"url":"https://api.github.com/repos/blazegraph/database/issues/comments/410407164","html_url":"https://github.com/blazegraph/database/issues/100#issuecomment-410407164","issue_url":"https://api.github.com/repos/blazegraph/database/issues/100","id":410407164,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDQwNzE2NA==","user":{"login":"smalyshev","id":155000,"node_id":"MDQ6VXNlcjE1NTAwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/155000?v=4","gravatar_id":"","url":"https://api.github.com/users/smalyshev","html_url":"https://github.com/smalyshev","followers_url":"https://api.github.com/users/smalyshev/followers","following_url":"https://api.github.com/users/smalyshev/following{/other_user}","gists_url":"https://api.github.com/users/smalyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/smalyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smalyshev/subscriptions","organizations_url":"https://api.github.com/users/smalyshev/orgs","repos_url":"https://api.github.com/users/smalyshev/repos","events_url":"https://api.github.com/users/smalyshev/events{/privacy}","received_events_url":"https://api.github.com/users/smalyshev/received_events","type":"User","site_admin":false},"created_at":"2018-08-04T00:25:36Z","updated_at":"2018-08-04T00:25:36Z","author_association":"CONTRIBUTOR","body":"Looks like the IV is reset on context.conn.flush() which is eventually calling LexiconRelation.addTerms on all terms mentioned in the update, getInlineIV(v) in addTerms seems to reset the iv.  I am not sure this is the intended effect - it looks a bit strange to modify values in that place if there's already IV inside, but the comment mentions it, so maybe it's OK. But in this case, shouldn't it also do: iv.setValue(value) in createInlineIV()?"}}
{"actor":{"display_login":"smalyshev"}}