asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jianfeng Jia (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ASTERIXDB-1485) NPE when translate one AQL query
Date Thu, 11 Aug 2016 19:01:20 GMT

    [ https://issues.apache.org/jira/browse/ASTERIXDB-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417751#comment-15417751
] 

Jianfeng Jia commented on ASTERIXDB-1485:
-----------------------------------------

Here are 5 sample records:
{code}
[ { "create_at": "2012-05-01T09:15:07.000Z", "id": 197358499422928896, "text": "I Miss Da
Hood", "in_reply_to_status": -1, "in_reply_to_user": -1, "favorite_count": -1, "coordinate":
[-81.6430449, 38.3092672], "retweet_count": 0, "lang": "null", "is_retweet": false, "hashtags":
null, "user_mentions": null, "user": { "id": 331998689, "name": "ImAGlenardenNigga", "screen_name":
"WhiteBoyTurntUp", "lang": "en", "location": "Glenarden D $M$ V ", "create_at": "2011-07-08",
"description": "#TeamNAS #TeamTatted #TeamTakin #TeamLightSkin #TeamRollUp #TeamGDHU #TeamGlenarden
#Follow My Folk's @EfffYou_PayMe & Go Follow My Short Stuff @_Chinkyy ", "followers_count":
1629, "friends_count": 1542, "statues_count": 40754 }, "place": { "country": "United States",
"country_code": "United States", "full_name": "Charleston, WV", "id": "44439f1538ac3ca0",
"name": "Charleston", "place_type": "city", "bounding_box": [ [-81.727777, 38.281139], [-81.559673,
38.405759] ] }, "geo_tag": { "stateID": 54, "stateName": "West Virginia", "countyID": 54039,
"countyName": "Kanawha", "cityID": 5414600, "cityName": "Charleston" } }
, { "create_at": "2012-05-01T09:15:08.000Z", "id": 197358503617241088, "text": "✍ UK [contract]
Java/ATG Developer x 4 at http://t.co/TvUNu4UR ✔ #jobs", "in_reply_to_status": -1, "in_reply_to_user":
-1, "favorite_count": -1, "coordinate": [0.13017578, 51.26358251], "retweet_count": 0, "lang":
"null", "is_retweet": false, "hashtags": [ "jobs" ], "user_mentions": null, "user": { "id":
80654241, "name": "david morgan", "screen_name": "adsbringcust", "lang": "en", "location":
"Northampton, UK", "create_at": "2009-10-07", "description": "see my latest site:", "followers_count":
1765, "friends_count": 1998, "statues_count": 77360 }, "place": { "country": "United Kingdom",
"country_code": "United Kingdom", "full_name": "Sevenoaks, Kent", "id": "5747f33800b71f4b",
"name": "Sevenoaks", "place_type": "city", "bounding_box": [ [0.033526, 51.13179], [0.344757,
51.417971] ] }, "geo_tag": { "stateID": 2, "stateName": "Alaska", "countyID": 2016, "countyName":
"Aleutians West", "cityID": null, "cityName": null } }
, { "create_at": "2012-05-01T09:15:16.000Z", "id": 197358537167482881, "text": "I don't condone
dick ridinn", "in_reply_to_status": -1, "in_reply_to_user": -1, "favorite_count": -1, "coordinate":
[-77.3015925, 38.6525867], "retweet_count": 0, "lang": "null", "is_retweet": false, "hashtags":
null, "user_mentions": null, "user": { "id": 227806764, "name": "DominiqueHalliburton", "screen_name":
"NdeaaLovee_", "lang": "en", "location": "", "create_at": "2010-12-17", "description": "Better
run, better run, faster then my bullet ︻┳═一\r\nBabyy ima BOSS, idk wht they do", "followers_count":
327, "friends_count": 316, "statues_count": 5692 }, "place": { "country": "United States",
"country_code": "United States", "full_name": "Maryland, US", "id": "dea1eac2d7ef8878", "name":
"Maryland", "place_type": "admin", "bounding_box": [ [-79.487651, 37.886605], [-74.986282,
39.723037] ] }, "geo_tag": { "stateID": 51, "stateName": "Virginia", "countyID": 51153, "countyName":
"Prince William", "cityID": 5121088, "cityName": "Dale City" } }
, { "create_at": "2012-05-01T09:15:25.000Z", "id": 197358574933000192, "text": "I'm at Спортмастер
(Москва, Россия) http://t.co/nLT49yhG", "in_reply_to_status": -1, "in_reply_to_user":
-1, "favorite_count": -1, "coordinate": [37.74370193, 55.64500063], "retweet_count": 0, "lang":
"null", "is_retweet": false, "hashtags": null, "user_mentions": null, "user": { "id": 94982186,
"name": "Liana", "screen_name": "Lianochka_", "lang": "en", "location": "Russia, Moscow",
"create_at": "2009-12-06", "description": "", "followers_count": 74, "friends_count": 54,
"statues_count": 3570 }, "place": { "country": "Russia", "country_code": "Russia", "full_name":
"Спортмастер, Moscow", "id": "c2b9829738f1d427", "name": "Спортмастер",
"place_type": "poi", "bounding_box": [ [37.7437789, 55.6453589], [37.743779, 55.645359] ]
}, "geo_tag": { "stateID": 2, "stateName": "Alaska", "countyID": 2016, "countyName": "Aleutians
West", "cityID": null, "cityName": null } }
, { "create_at": "2012-05-01T09:15:36.000Z", "id": 197358621032583168, "text": "#thankyougame
I thank everyone who has stuck by my side <3", "in_reply_to_status": -1, "in_reply_to_user":
-1, "favorite_count": -1, "coordinate": [-70.8766775, 42.8107381], "retweet_count": 0, "lang":
"null", "is_retweet": false, "hashtags": [ "thankyougame" ], "user_mentions": null, "user":
{ "id": 567441471, "name": "kelsey w harrington", "screen_name": "KelsWHarrington", "lang":
"en", "location": "Massachusetts", "create_at": "2012-04-30", "description": "", "followers_count":
6, "friends_count": 39, "statues_count": 19 }, "place": { "country": "United States", "country_code":
"United States", "full_name": "Newburyport, MA", "id": "96bf65a35e9304b6", "name": "Newburyport",
"place_type": "city", "bounding_box": [ [-70.940799, 42.787019], [-70.808423, 42.841039] ]
}, "geo_tag": { "stateID": 25, "stateName": "Massachusetts", "countyID": 25009, "countyName":
"Essex", "cityID": 2545245, "cityName": "Newburyport" } }
 ]
{code}

> NPE when translate one AQL query
> --------------------------------
>
>                 Key: ASTERIXDB-1485
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1485
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Optimizer
>         Environment: Master: 
> commit fd1d460da73397de9f44d7b098543f7897844794
> Date:   Wed Jun 15 11:29:36 2016 -0400
>            Reporter: Jianfeng Jia
>            Assignee: Yingyi Bu
>
> AQL is as following
> {code}
> use dataverse twitter
> let $common := (
> for $t in dataset twitter.ds_tweet
> where similarity-jaccard(word-tokens($t."text"), word-tokens("happy")) > 0.0
> and contains($t."text", "hate")
> let $set := [ 72,37,51,24,11,10,34,42,9,44,15,48,35,4,40,6,20,32,8,49,12,22,28,1,13,45,5,47,21,29,54,17,18,39,19,55,26,27,31,56,41,46,16,30,53,38,25,36,50,33,23,2
]
> for $sid in $set
> where $t.geo_tag.stateID = $sid
> where
> ($t."create_at">= datetime("2016-06-15T18:53:42.894Z")
> and $t."create_at" <= datetime("2016-06-15T19:25:11.000Z"))
> return $t
> )
> let $hashtag := (
> for $t in $common
> where not(is-null($t.hashtags))
> for $h in $t.hashtags
> group by $tag := $h with $h
> let $c := count($h)
> order by $c desc
> limit 50
> return { "key": $tag, "count" : $c}
> )
> return $hashtag
> {code}
> ddl can be found [here| https://github.com/ISG-ICS/cloudberry/blob/master/noah/src/main/resources/twitter/aql/ddl.aql]
> The exception is following:
> {code}
> SEVERE: null 
> java.lang.NullPointerException
>     at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:174)
>     at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:153)
>     at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.resolveResultType(TypeComputeUtils.java:84)
>     at org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer.computeType(AbstractResultTypeComputer.java:39)
>     at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:75)
>     at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:53)
>     at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.computeOutputTypeEnvironment(AssignOperator.java:92)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AlgebricksOptimizationContext.computeAndSetTypeEnvironmentForOperator(AlgebricksOptimizationContext.java:295)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:256)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.core.algebra.util.OperatorPropertiesUtil.typeOpRec(OperatorPropertiesUtil.java:249)
>     at org.apache.hyracks.algebricks.rewriter.rules.PushSelectDownRule.rewritePre(PushSelectDownRule.java:66)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:90)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:99)
>     at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:53)
>     at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:95)
>     at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:82)
>     at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:88)
>     at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:263)
>     at org.apache.asterix.aql.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1959)
>     at org.apache.asterix.aql.translator.QueryTranslator.handleQuery(QueryTranslator.java:2521)
>     at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:389)
>     at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:253)
                           
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message