Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 3: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/402/ : 
SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


[jira] [Commented] (ASTERIXDB-1601) CREATE TYPE failure as NPE (unsupported/untested feature?)

2016-08-21 Thread Michael J. Carey (JIRA)

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

Michael J. Carey commented on ASTERIXDB-1601:
-

Agreed!





> CREATE TYPE failure as NPE (unsupported/untested feature?)
> --
>
> Key: ASTERIXDB-1601
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1601
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: AsterixDB, Documentation, Error Reporting, Translator - 
> AQL
> Environment: OSX and master
>Reporter: Michael J. Carey
>Assignee: Till
>Priority: Critical
>  Labels: soon
>
> I just tried something that I'd long forgotten about that's documented in the 
> reference manual but basically never used - and it doesn't work.  I am 
> thinking we should disable this (and other things like it), perhaps?  Here's 
> what I did:
> DROP DATAVERSE TinySocial2;
> CREATE DATAVERSE TinySocial2;
> USE TinySocial2;
> CREATE TYPE MyUserTupleType AS CLOSED {
>   id: uuid, alias: string?, name: string
> };
>CREATE TYPE RenamedType AS MyUserTupleType;
> Here's what I got:
> Internal error. Please check instance logs for further details. 
> [NullPointerException]



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


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 3:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/402/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 3:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2325/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Michael Blow (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/1098

to look at the new patch set (#3).

Change subject: Add Record Literal and Byte Array Value Reference
..

Add Record Literal and Byte Array Value Reference

This change include 3 different parts:
1. It introduced record literals in order to enable the use of
constant records as function input.
2. It introduces ByteArrayValueReference which is a mutable
reference that can be wrapped around byte[].
3. It improves the Schemaless record serializer deserializer.

Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
A 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/LangRecordParseUtil.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/ConstantExpressionUtil.java
A 
hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/accessors/ByteArrayValueReference.java
8 files changed, 151 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/98/1098/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Yingyi Bu 


Change in asterixdb[master]: Improved Error Reporting When Repsonse Is Non-JSON

2016-08-21 Thread Till Westmann (Code Review)
Till Westmann has submitted this change and it was merged.

Change subject: Improved Error Reporting When Repsonse Is Non-JSON
..


Improved Error Reporting When Repsonse Is Non-JSON

Change-Id: I2d27945a1d39bdc3304abcb8fd75c5173aee74c4
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1099
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Reviewed-by: Till Westmann 
Integration-Tests: Jenkins 
---
M 
asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
1 file changed, 17 insertions(+), 8 deletions(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified; No violations found; Verified



diff --git 
a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
 
b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
index 3321065..47290e7 100644
--- 
a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
+++ 
b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
@@ -58,6 +58,7 @@
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.impl.client.StandardHttpRequestRetryHandler;
 import org.apache.http.util.EntityUtils;
+import org.json.JSONException;
 import org.json.JSONObject;
 
 public class TestExecutor {
@@ -267,14 +268,22 @@
 // In future this may be changed depending on the requested
 // output format sent to the servlet.
 String errorBody = EntityUtils.toString(httpResponse.getEntity());
-JSONObject result = new JSONObject(errorBody);
-String[] errors = { 
result.getJSONArray("error-code").getString(0), result.getString("summary"),
-result.getString("stacktrace") };
-GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, errors[2]);
-String exceptionMsg = "HTTP operation failed: " + errors[0]
-+ "\nSTATUS LINE: " + httpResponse.getStatusLine()
-+ "\nSUMMARY: " + errors[1] + "\nSTACKTRACE: " + errors[2];
-throw new Exception(exceptionMsg);
+try {
+JSONObject result = new JSONObject(errorBody);
+String[] errors = 
{result.getJSONArray("error-code").getString(0), result.getString("summary"),
+result.getString("stacktrace")};
+GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, errors[2]);
+String exceptionMsg = "HTTP operation failed: " + errors[0]
++ "\nSTATUS LINE: " + httpResponse.getStatusLine()
++ "\nSUMMARY: " + errors[1] + "\nSTACKTRACE: " + 
errors[2];
+throw new Exception(exceptionMsg);
+} catch (JSONException e) {
+GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, errorBody);
+String exceptionMsg = "HTTP operation failed: response is not 
valid-JSON (see nested exception)"
++ "\nSTATUS LINE: " + httpResponse.getStatusLine()
++ "\nERROR_BODY: " + errorBody;
+throw new Exception(exceptionMsg, e);
+}
 }
 return httpResponse;
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1099
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d27945a1d39bdc3304abcb8fd75c5173aee74c4
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 


Change in asterixdb[master]: Improved Error Reporting When Repsonse Is Non-JSON

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Improved Error Reporting When Repsonse Is Non-JSON
..


Patch Set 1: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/401/ : 
SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1099
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d27945a1d39bdc3304abcb8fd75c5173aee74c4
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: No


Change in asterixdb[master]: Improved Error Reporting When Repsonse Is Non-JSON

2016-08-21 Thread Till Westmann (Code Review)
Till Westmann has posted comments on this change.

Change subject: Improved Error Reporting When Repsonse Is Non-JSON
..


Patch Set 1: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1099
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d27945a1d39bdc3304abcb8fd75c5173aee74c4
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: No


Change in asterixdb[master]: Improved Error Reporting When Repsonse Is Non-JSON

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Improved Error Reporting When Repsonse Is Non-JSON
..


Patch Set 1:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/401/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1099
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d27945a1d39bdc3304abcb8fd75c5173aee74c4
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: No


Change in asterixdb[master]: Improved Error Reporting When Repsonse Is Non-JSON

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Improved Error Reporting When Repsonse Is Non-JSON
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2324/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1099
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d27945a1d39bdc3304abcb8fd75c5173aee74c4
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: Improved Error Reporting When Repsonse Is Non-JSON

2016-08-21 Thread Michael Blow (Code Review)
Michael Blow has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1099

Change subject: Improved Error Reporting When Repsonse Is Non-JSON
..

Improved Error Reporting When Repsonse Is Non-JSON

Change-Id: I2d27945a1d39bdc3304abcb8fd75c5173aee74c4
---
M 
asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
1 file changed, 17 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/99/1099/1

diff --git 
a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
 
b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
index 3321065..47290e7 100644
--- 
a/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
+++ 
b/asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java
@@ -58,6 +58,7 @@
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.impl.client.StandardHttpRequestRetryHandler;
 import org.apache.http.util.EntityUtils;
+import org.json.JSONException;
 import org.json.JSONObject;
 
 public class TestExecutor {
@@ -267,14 +268,22 @@
 // In future this may be changed depending on the requested
 // output format sent to the servlet.
 String errorBody = EntityUtils.toString(httpResponse.getEntity());
-JSONObject result = new JSONObject(errorBody);
-String[] errors = { 
result.getJSONArray("error-code").getString(0), result.getString("summary"),
-result.getString("stacktrace") };
-GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, errors[2]);
-String exceptionMsg = "HTTP operation failed: " + errors[0]
-+ "\nSTATUS LINE: " + httpResponse.getStatusLine()
-+ "\nSUMMARY: " + errors[1] + "\nSTACKTRACE: " + errors[2];
-throw new Exception(exceptionMsg);
+try {
+JSONObject result = new JSONObject(errorBody);
+String[] errors = 
{result.getJSONArray("error-code").getString(0), result.getString("summary"),
+result.getString("stacktrace")};
+GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, errors[2]);
+String exceptionMsg = "HTTP operation failed: " + errors[0]
++ "\nSTATUS LINE: " + httpResponse.getStatusLine()
++ "\nSUMMARY: " + errors[1] + "\nSTACKTRACE: " + 
errors[2];
+throw new Exception(exceptionMsg);
+} catch (JSONException e) {
+GlobalConfig.ASTERIX_LOGGER.log(Level.SEVERE, errorBody);
+String exceptionMsg = "HTTP operation failed: response is not 
valid-JSON (see nested exception)"
++ "\nSTATUS LINE: " + httpResponse.getStatusLine()
++ "\nERROR_BODY: " + errorBody;
+throw new Exception(exceptionMsg, e);
+}
 }
 return httpResponse;
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1099
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d27945a1d39bdc3304abcb8fd75c5173aee74c4
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow 


[jira] [Commented] (ASTERIXDB-1601) CREATE TYPE failure as NPE (unsupported/untested feature?)

2016-08-21 Thread Till (JIRA)

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

Till commented on ASTERIXDB-1601:
-

Hmm, if we didn't need or test them so far, maybe we should really 
disable/remove them? 
Seems to be "near-death code" :)
We can always add them both features (non-record types and replicated types) 
back with a non-Critical priority ...


> CREATE TYPE failure as NPE (unsupported/untested feature?)
> --
>
> Key: ASTERIXDB-1601
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1601
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: AsterixDB, Documentation, Error Reporting, Translator - 
> AQL
> Environment: OSX and master
>Reporter: Michael J. Carey
>Assignee: Till
>Priority: Critical
>  Labels: soon
>
> I just tried something that I'd long forgotten about that's documented in the 
> reference manual but basically never used - and it doesn't work.  I am 
> thinking we should disable this (and other things like it), perhaps?  Here's 
> what I did:
> DROP DATAVERSE TinySocial2;
> CREATE DATAVERSE TinySocial2;
> USE TinySocial2;
> CREATE TYPE MyUserTupleType AS CLOSED {
>   id: uuid, alias: string?, name: string
> };
>CREATE TYPE RenamedType AS MyUserTupleType;
> Here's what I got:
> Internal error. Please check instance logs for further details. 
> [NullPointerException]



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


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 2: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/400/ : 
SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Michael Blow (Code Review)
Michael Blow has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 2:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/1098/2/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java
File 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java:

Line 47: return super.equals(o) && ObjectUtils.equals(record, 
((RecordLiteral) o).record);
these two checks are redundant


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: Yes


Change in asterixdb[master]: some WebUI hackery

2016-08-21 Thread Yingyi Bu (Code Review)
Yingyi Bu has posted comments on this change.

Change subject: some WebUI hackery
..


Patch Set 1:

So the new UI will not support AQL?

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1097
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I32361a523e656c62a6bc878b1eed9750579097f9
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 2:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/400/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 2:

WARNING: THIS CHANGE CONTAINS CROSS-PRODUCT CHANGES IN:
* asterixdb
* hyracks-fullstack

PLEASE REVIEW CAREFULLY AND LOOK FOR API CHANGES!

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 2:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2323/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread abdullah alamoudi (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/1098

to look at the new patch set (#2).

Change subject: Add Record Literal and Byte Array Value Reference
..

Add Record Literal and Byte Array Value Reference

This change include 3 different parts:
1. It introduced record literals in order to enable the use of
constant records as function input.
2. It introduces ByteArrayValueReference which is a mutable
reference that can be wrapped around byte[].
3. It improves the Schemaless record serializer deserializer.

Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
A 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/LangRecordParseUtil.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/ConstantExpressionUtil.java
A 
hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/accessors/ByteArrayValueReference.java
8 files changed, 151 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/98/1098/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Yingyi Bu 


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Yingyi Bu (Code Review)
Yingyi Bu has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 1:

(3 comments)

What's the motivation or introducing the two new classes?

- Literal is a parser concept. Currently we don't parse records or lists 
directly in the AQL or SQL++ parser,  but as constructor expressions.

- The functionality of ByteArrayValueReference seems not much different from 
VoidPointable?

- It seems their constructors are not called.

https://asterix-gerrit.ics.uci.edu/#/c/1098/1/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
File 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java:

Line 39: RECORD
Literal is a parser concept.

We don't parse records or lists directly in the AQL or SQL++ parser.

For example, you can take a look at:
asterixdb/asterixdb/asterix-lang-sqlpp/target/site/jjdoc/SQLPP.html


https://asterix-gerrit.ics.uci.edu/#/c/1098/1/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java
File 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java:

Line 29: public RecordLiteral(ARecord record) {
It seems nobody calls this constructor.


https://asterix-gerrit.ics.uci.edu/#/c/1098/1/hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/accessors/ByteArrayValueReference.java
File 
hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/accessors/ByteArrayValueReference.java:

Line 23: public class ByteArrayValueReference implements IValueReference {
What's the difference of this class with VoidPointable?
It seems nobody calls this constructor.


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: Yes


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 1:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/399/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 1:

WARNING: THIS CHANGE CONTAINS CROSS-PRODUCT CHANGES IN:
* asterixdb
* hyracks-fullstack

PLEASE REVIEW CAREFULLY AND LOOK FOR API CHANGES!

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread abdullah alamoudi (Code Review)
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1098

Change subject: Add Record Literal and Byte Array Value Reference
..

Add Record Literal and Byte Array Value Reference

This change include 3 different parts:
1. It introduced record literals in order to enable the use of
constant records as function input.
2. It introduces ByteArrayValueReference which is a mutable
reference that can be wrapped around byte[].
3. It improves the Schemaless record serializer deserializer.

Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
A 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java
M 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/util/LangRecordParseUtil.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/ARecordSerializerDeserializer.java
M 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/util/ConstantExpressionUtil.java
A 
hyracks-fullstack/hyracks/hyracks-dataflow-common/src/main/java/org/apache/hyracks/dataflow/common/data/accessors/ByteArrayValueReference.java
7 files changed, 137 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/98/1098/1

diff --git 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
index 8ded10b..51861cb 100644
--- 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
+++ 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/ConstantHelper.java
@@ -23,6 +23,7 @@
 import org.apache.asterix.lang.common.literal.FloatLiteral;
 import org.apache.asterix.lang.common.literal.IntegerLiteral;
 import org.apache.asterix.lang.common.literal.LongIntegerLiteral;
+import org.apache.asterix.lang.common.literal.RecordLiteral;
 import org.apache.asterix.lang.common.literal.StringLiteral;
 import org.apache.asterix.om.base.ABoolean;
 import org.apache.asterix.om.base.ADouble;
@@ -31,6 +32,7 @@
 import org.apache.asterix.om.base.AInt64;
 import org.apache.asterix.om.base.AMissing;
 import org.apache.asterix.om.base.ANull;
+import org.apache.asterix.om.base.ARecord;
 import org.apache.asterix.om.base.AString;
 import org.apache.asterix.om.base.IAObject;
 
@@ -61,6 +63,8 @@
 return new AString(sl.getValue());
 case TRUE:
 return ABoolean.TRUE;
+case RECORD:
+return (ARecord) ((RecordLiteral) valLiteral).getValue();
 default:
 throw new IllegalStateException();
 }
diff --git 
a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
 
b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
index 1ca8ac4..ede8689 100644
--- 
a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
+++ 
b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/Literal.java
@@ -35,7 +35,8 @@
 FALSE,
 FLOAT,
 DOUBLE,
-LONG
+LONG,
+RECORD
 }
 
 abstract public Object getValue();
diff --git 
a/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java
 
b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java
new file mode 100644
index 000..59eb144
--- /dev/null
+++ 
b/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/literal/RecordLiteral.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.lang.common.literal;
+
+import org.apache.asterix.lang.common.base.Literal;
+import org.apache.asterix.om.base.ARecord;
+
+public class 

Change in asterixdb[master]: Add Record Literal and Byte Array Value Reference

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add Record Literal and Byte Array Value Reference
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2322/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1098
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I25c5054a361128a3bee4241d7b9b40da7e61373f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: some WebUI hackery

2016-08-21 Thread Michael Blow (Code Review)
Michael Blow has posted comments on this change.

Change subject: some WebUI hackery
..


Patch Set 1: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1097
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I32361a523e656c62a6bc878b1eed9750579097f9
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-HasComments: No


[jira] [Commented] (ASTERIXDB-1601) CREATE TYPE failure as NPE (unsupported/untested feature?)

2016-08-21 Thread Michael J. Carey (JIRA)

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

Michael J. Carey commented on ASTERIXDB-1601:
-

E.g., here's another document-allowed CREATE TYPE example that doesn't actually 
work (though no NPE :-)) if you try replacing the employment history for users 
with the renamed type:

CREATE TYPE EmploymentHistory AS [ EmploymentType ];

CREATE TYPE GleambookUserType AS {
  id: int,
  alias:  string,
  name:   string,
  userSince: datetime,
  friendIds: {{ int }},
  employment: [ EmploymentType ]
};

If you change the above field to "  employment: EmploymentHistory ... " you 
get:

org.apache.asterix.om.types.AOrderedListType cannot be cast to 
org.apache.asterix.om.types.ARecordType [ClassCastException]

My proposal would be to only allow CREATE TYPE to be used to create a new 
record type for now, which is all we ever use it for.  I can't even remember 
why all that other stuff was/is there - but - sure enough, it dates back to the 
reference manual for UC AsterixDB 2013... :-)

> CREATE TYPE failure as NPE (unsupported/untested feature?)
> --
>
> Key: ASTERIXDB-1601
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1601
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: AsterixDB, Documentation, Error Reporting, Translator - 
> AQL
> Environment: OSX and master
>Reporter: Michael J. Carey
>Assignee: Till
>Priority: Critical
>  Labels: soon
>
> I just tried something that I'd long forgotten about that's documented in the 
> reference manual but basically never used - and it doesn't work.  I am 
> thinking we should disable this (and other things like it), perhaps?  Here's 
> what I did:
> DROP DATAVERSE TinySocial2;
> CREATE DATAVERSE TinySocial2;
> USE TinySocial2;
> CREATE TYPE MyUserTupleType AS CLOSED {
>   id: uuid, alias: string?, name: string
> };
>CREATE TYPE RenamedType AS MyUserTupleType;
> Here's what I got:
> Internal error. Please check instance logs for further details. 
> [NullPointerException]



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


[jira] [Created] (ASTERIXDB-1601) CREATE TYPE failure as NPE (unsupported/untested feature?)

2016-08-21 Thread Michael J. Carey (JIRA)
Michael J. Carey created ASTERIXDB-1601:
---

 Summary: CREATE TYPE failure as NPE (unsupported/untested feature?)
 Key: ASTERIXDB-1601
 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1601
 Project: Apache AsterixDB
  Issue Type: Bug
  Components: AsterixDB, Documentation, Error Reporting, Translator - 
AQL
 Environment: OSX and master
Reporter: Michael J. Carey
Assignee: Till
Priority: Critical


I just tried something that I'd long forgotten about that's documented in the 
reference manual but basically never used - and it doesn't work.  I am thinking 
we should disable this (and other things like it), perhaps?  Here's what I did:

DROP DATAVERSE TinySocial2;
CREATE DATAVERSE TinySocial2;
USE TinySocial2;
CREATE TYPE MyUserTupleType AS CLOSED {
  id: uuid, alias: string?, name: string
};
   CREATE TYPE RenamedType AS MyUserTupleType;

Here's what I got:

Internal error. Please check instance logs for further details. 
[NullPointerException]




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


Change in asterixdb[master]: some WebUI hackery

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: some WebUI hackery
..


Patch Set 1: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/398/ : 
SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1097
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I32361a523e656c62a6bc878b1eed9750579097f9
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


[jira] [Created] (ASTERIXDB-1600) Support for date arthimetic

2016-08-21 Thread Vignesh Raghunathan (JIRA)
Vignesh Raghunathan created ASTERIXDB-1600:
--

 Summary: Support for date arthimetic
 Key: ASTERIXDB-1600
 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1600
 Project: Apache AsterixDB
  Issue Type: Improvement
Reporter: Vignesh Raghunathan


{code}
drop dataverse sampdb if exists;
create dataverse sampdb;
use sampdb;

drop dataset samptable if exists;
drop type samptabletype if exists;

create type samptabletype as closed {
  dt: date
};

create dataset samptable(samptabletype) primary key dt;

select *
from samptable s1, samptable s2
where s1.dt > s2.dt + 5;
{code}

The above query can't be expressed in sqlpp without support for date type 
arithmetic.



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


Change in asterixdb[master]: some WebUI hackery

2016-08-21 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: some WebUI hackery
..


Patch Set 1:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/398/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1097
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I32361a523e656c62a6bc878b1eed9750579097f9
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No