asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Maxon (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ASTERIXDB-2159) ValidateUtil throws NPE when autogenerated field not present in dataset type
Date Wed, 08 Nov 2017 23:20:00 GMT
Ian Maxon created ASTERIXDB-2159:
------------------------------------

             Summary: ValidateUtil throws NPE when autogenerated field not present in dataset
type
                 Key: ASTERIXDB-2159
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2159
             Project: Apache AsterixDB
          Issue Type: Bug
            Reporter: Ian Maxon
            Assignee: Ian Maxon


CREATE DATAVERSE foo;
USE foo;
CREATE TYPE myType AS OPEN {                                                  
    `foo`: string,                                                                  
    `bar`: string                                                     
};

CREATE DATASET datasetName(myType)                                               
   PRIMARY KEY auto_id AUTOGENERATED;

Will throw an NPE:
Nov 08, 2017 3:15:29 PM org.apache.asterix.api.http.server.ApiServlet post
SEVERE: null
java.lang.NullPointerException
	at org.apache.asterix.translator.util.ValidateUtil.validatePartitioningExpressions(ValidateUtil.java:122)
	at org.apache.asterix.app.translator.QueryTranslator.handleCreateDatasetStatement(QueryTranslator.java:579)
	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:295)
	at org.apache.asterix.api.http.server.ApiServlet.post(ApiServlet.java:162)
	at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:78)
	at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:70)
	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:55)
	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:36)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)


It should throw a descriptive error code. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message