Change in asterixdb[master]: [ASTERIX-3376][COMP] Choose smaller side's sample

2024-04-24 Thread AsterixDB Code Review
Attention is currently required from: murali.kris...@couchbase.com.
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254 )

Change subject: [ASTERIX-3376][COMP] Choose smaller side's sample
..


Patch Set 2: Contrib+1

Analytics Compatibility Tests Successful
https://cbjenkins.page.link/F1gRXLJmbTz6euX87 : SUCCESS


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I63445673ba10782d85717b780c07687db8f8011f
Gerrit-Change-Number: 18254
Gerrit-PatchSet: 2
Gerrit-Owner: murali.kris...@couchbase.com
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Attention: murali.kris...@couchbase.com
Gerrit-Comment-Date: Thu, 25 Apr 2024 05:44:07 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[master]: [ASTERIX-3376][COMP] Choose smaller side's sample

2024-04-24 Thread AsterixDB Code Review
>From Jenkins :

Attention is currently required from: murali.kris...@couchbase.com.
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254 )

Change subject: [ASTERIX-3376][COMP] Choose smaller side's sample
..


Patch Set 2: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-trigger/366/ : SUCCESS


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I63445673ba10782d85717b780c07687db8f8011f
Gerrit-Change-Number: 18254
Gerrit-PatchSet: 2
Gerrit-Owner: murali.kris...@couchbase.com
Gerrit-Reviewer: Jenkins 
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-Attention: murali.kris...@couchbase.com
Gerrit-Comment-Date: Thu, 25 Apr 2024 04:35:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[master]: [ASTERIX-3376][COMP] Choose smaller side's sample

2024-04-24 Thread AsterixDB Code Review
Attention is currently required from: murali.kris...@couchbase.com.
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254 )

Change subject: [ASTERIX-3376][COMP] Choose smaller side's sample
..


Patch Set 2:

Analytics Compatibility Compilation Successful
https://cbjenkins.page.link/Lzk3HizsFSui5D9Z6 : SUCCESS


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I63445673ba10782d85717b780c07687db8f8011f
Gerrit-Change-Number: 18254
Gerrit-PatchSet: 2
Gerrit-Owner: murali.kris...@couchbase.com
Gerrit-Reviewer: Jenkins 
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-Attention: murali.kris...@couchbase.com
Gerrit-Comment-Date: Thu, 25 Apr 2024 03:33:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in asterixdb[master]: [ASTERIX-3376][COMP] Choose smaller side's sample

2024-04-24 Thread AsterixDB Code Review
>From :

Hello Jenkins,

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

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254

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

Change subject: [ASTERIX-3376][COMP] Choose smaller side's sample
..

[ASTERIX-3376][COMP] Choose smaller side's sample

Change-Id: I63445673ba10782d85717b780c07687db8f8011f
---
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/leftouterjoin/index-only-leftouterjoin/index-only-leftouterjoin.008.plan
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/Stats.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/join/hash-join-with-redundant-variable/hash-join-with-redundant-variable.10.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/cardinality-estimation/join-queries/join-queries.8.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/join/hash-join-with-redundant-variable/hash-join-with-redundant-variable.14.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/join/hash-join-with-redundant-variable/hash-join-with-redundant-variable.04.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/join/hash-join-with-redundant-variable/hash-join-with-redundant-variable.12.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/leftouterjoin/index-only-leftouterjoin/index-only-leftouterjoin.009.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/field-access-pushdown/field-access-pushdown.008.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/leftouterjoin/index-only-leftouterjoin/index-only-leftouterjoin.007.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/join/hash-join-with-redundant-variable/hash-join-with-redundant-variable.16.plan
M 
asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/leftouterjoin/index-only-leftouterjoin/index-only-leftouterjoin.010.plan
12 files changed, 228 insertions(+), 214 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/54/18254/2
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I63445673ba10782d85717b780c07687db8f8011f
Gerrit-Change-Number: 18254
Gerrit-PatchSet: 2
Gerrit-Owner: murali.kris...@couchbase.com
Gerrit-Reviewer: Jenkins 
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-MessageType: newpatchset


Change in asterixdb[master]: [ASTERIX-3376][COMP] Choose smaller side's sample

2024-04-24 Thread AsterixDB Code Review
>From Jenkins :

Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254 )

Change subject: [ASTERIX-3376][COMP] Choose smaller side's sample
..


Patch Set 1: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-trigger/365/ : SUCCESS


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I63445673ba10782d85717b780c07687db8f8011f
Gerrit-Change-Number: 18254
Gerrit-PatchSet: 1
Gerrit-Owner: murali.kris...@couchbase.com
Gerrit-Reviewer: Jenkins 
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-Comment-Date: Thu, 25 Apr 2024 03:19:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[master]: [ASTERIX-3376][COMP] Choose smaller side's sample

2024-04-24 Thread AsterixDB Code Review
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254 )

Change subject: [ASTERIX-3376][COMP] Choose smaller side's sample
..


Patch Set 1:

Analytics Compatibility Compilation Successful
https://cbjenkins.page.link/w9qQDrEzxw2eLUGw9 : SUCCESS


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I63445673ba10782d85717b780c07687db8f8011f
Gerrit-Change-Number: 18254
Gerrit-PatchSet: 1
Gerrit-Owner: murali.kris...@couchbase.com
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-CC: Jenkins 
Gerrit-Comment-Date: Thu, 25 Apr 2024 02:13:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in asterixdb[master]: [ASTERIX-3376][COMP] Choose smaller side's sample

2024-04-24 Thread AsterixDB Code Review
>From :

murali.kris...@couchbase.com has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254 )


Change subject: [ASTERIX-3376][COMP] Choose smaller side's sample
..

[ASTERIX-3376][COMP] Choose smaller side's sample

Change-Id: I63445673ba10782d85717b780c07687db8f8011f
---
M 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/Stats.java
1 file changed, 20 insertions(+), 2 deletions(-)



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

diff --git 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/Stats.java
 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/Stats.java
index 785da69..574e207 100644
--- 
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/Stats.java
+++ 
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/cbo/Stats.java
@@ -163,12 +163,21 @@
 return productivity / card1;
 }
 } else {
-ILogicalOperator leafInput = joinEnum.leafInputs.get(idx2 - 1); // 
we arbitrarily pick one side
+ILogicalOperator leafInput;
+LogicalVariable var;
+// choose the smaller side sample; better results this way for 
sure!
+if (card1 < card2) {
+leafInput = joinEnum.leafInputs.get(idx1 - 1);
+var = exprUsedVars.get(0);
+} else {
+leafInput = joinEnum.leafInputs.get(idx2 - 1);
+var = exprUsedVars.get(1);
+}
 Index index = findIndex(leafInput);
 if (index == null) {
 return 1.0;
 }
-List> result = 
runSamplingQueryDistinct(this.optCtx, leafInput, exprUsedVars.get(1), index);
+List> result = 
runSamplingQueryDistinct(this.optCtx, leafInput, var, index);
 if (result == null) {
 return 1.0;
 }

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18254
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I63445673ba10782d85717b780c07687db8f8011f
Gerrit-Change-Number: 18254
Gerrit-PatchSet: 1
Gerrit-Owner: murali.kris...@couchbase.com
Gerrit-MessageType: newchange


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Ali Alsuliman :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Ali Alsuliman has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 3:

(1 comment)

Commit Message:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/748fcb1c_561460d2
PS3, Line 7: DOC-12137:
Replace this with [ASTERIXDB-3388][DOC]:



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 3
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 21:50:46 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in asterixdb[trinity]: [ASTERIXDB-3343][API] Add servlet to get completed requests

2024-04-24 Thread AsterixDB Code Review
>From Murtadha Hubail :

Attention is currently required from: Ali Alsuliman, Michael Blow.
Murtadha Hubail has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18109 )

Change subject: [ASTERIXDB-3343][API] Add servlet to get completed requests
..


Patch Set 1: Code-Review+2


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18109
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: trinity
Gerrit-Change-Id: I9bd395a75970abe01a4fab0a88abcae4df881564
Gerrit-Change-Number: 18109
Gerrit-PatchSet: 1
Gerrit-Owner: Ali Alsuliman 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Michael Blow 
Gerrit-Comment-Date: Wed, 24 Apr 2024 21:48:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[jira] [Created] (ASTERIXDB-3388) Document median function

2024-04-24 Thread Murtadha Makki Al Hubail (Jira)
Murtadha Makki Al Hubail created ASTERIXDB-3388:
---

 Summary: Document median function
 Key: ASTERIXDB-3388
 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3388
 Project: Apache AsterixDB
  Issue Type: Task
Reporter: Murtadha Makki Al Hubail
Assignee: Ali Alsuliman


The median function was recently added and it should be documented.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Change in asterixdb[master]: [WIP] Support COPY TO in parquet

2024-04-24 Thread AsterixDB Code Review
>From Jenkins :

Attention is currently required from: preetham.polupar...@couchbase.com.
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18209 )

Change subject: [WIP] Support COPY TO in parquet
..


Patch Set 24: Integration-Tests-1

Integration Tests Failed

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-trigger/363/ : UNSTABLE


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18209
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I40dc16969e66af09cde04b460f441af666b39d51
Gerrit-Change-Number: 18209
Gerrit-PatchSet: 24
Gerrit-Owner: preetham.polupar...@couchbase.com
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-CC: Wail Alkowaileet 
Gerrit-Attention: preetham.polupar...@couchbase.com
Gerrit-Comment-Date: Wed, 24 Apr 2024 19:31:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[master]: [WIP] Support COPY TO in parquet

2024-04-24 Thread AsterixDB Code Review
>From :

Attention is currently required from: preetham.polupar...@couchbase.com.
Hello Jenkins, Anon. E. Moose #1000171,

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

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18209

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

Change subject: [WIP] Support COPY TO in parquet
..

[WIP] Support COPY TO in parquet

Change-Id: I40dc16969e66af09cde04b460f441af666b39d51
---
A 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinter.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/ObjectWriteSupport.java
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/provider/ExternalWriterProvider.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.02.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.03.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.04.ddl.sqlpp
M asterixdb/asterix-om/pom.xml
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-simple/parquet-simple.03.ddl.sqlpp
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/ParquetRecordVisitorUtils.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-simple/parquet-simple.01.ddl.sqlpp
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/HDFSUtils.java
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/WriterValidationUtil.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.01.ddl.sqlpp
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/FieldNamesDictionary.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_s3.xml
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/resources/errormsg/en.properties
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/AsterixParquetWriter.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-simple/parquet-simple.04.query.sqlpp
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/ErrorCode.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/copy-to/parquet-simple/parquet-simple.04.adm
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-simple/parquet-simple.02.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/copy-to/parquet-tweet/parquet-tweet.05.adm
M asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
A 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinterFactory.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.05.query.sqlpp
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/ParquetRecordLazyVisitor.java
28 files changed, 1,464 insertions(+), 16 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/09/18209/24
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18209
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I40dc16969e66af09cde04b460f441af666b39d51
Gerrit-Change-Number: 18209
Gerrit-PatchSet: 24
Gerrit-Owner: preetham.polupar...@couchbase.com
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-CC: Wail Alkowaileet 
Gerrit-Attention: preetham.polupar...@couchbase.com
Gerrit-MessageType: newpatchset


Change in asterixdb[master]: [WIP] Support COPY TO in parquet

2024-04-24 Thread AsterixDB Code Review
>From Jenkins :

Attention is currently required from: preetham.polupar...@couchbase.com.
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18209 )

Change subject: [WIP] Support COPY TO in parquet
..


Patch Set 23: Integration-Tests-1

Integration Tests Failed

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-trigger/362/ : UNSTABLE


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18209
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I40dc16969e66af09cde04b460f441af666b39d51
Gerrit-Change-Number: 18209
Gerrit-PatchSet: 23
Gerrit-Owner: preetham.polupar...@couchbase.com
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-CC: Wail Alkowaileet 
Gerrit-Attention: preetham.polupar...@couchbase.com
Gerrit-Comment-Date: Wed, 24 Apr 2024 18:46:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[master]: [WIP] Support COPY TO in parquet

2024-04-24 Thread AsterixDB Code Review
>From :

Attention is currently required from: preetham.polupar...@couchbase.com.
Hello Jenkins, Anon. E. Moose #1000171,

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

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18209

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

Change subject: [WIP] Support COPY TO in parquet
..

[WIP] Support COPY TO in parquet

Change-Id: I40dc16969e66af09cde04b460f441af666b39d51
---
A 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinter.java
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/exceptions/ErrorCode.java
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/ObjectWriteSupport.java
M 
asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/provider/ExternalWriterProvider.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.02.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.03.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.04.ddl.sqlpp
M asterixdb/asterix-om/pom.xml
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-simple/parquet-simple.03.ddl.sqlpp
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/ParquetRecordVisitorUtils.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-simple/parquet-simple.01.ddl.sqlpp
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/HDFSUtils.java
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/WriterValidationUtil.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.01.ddl.sqlpp
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/FieldNamesDictionary.java
M 
asterixdb/asterix-app/src/test/resources/runtimets/testsuite_external_dataset_s3.xml
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/resources/errormsg/en.properties
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/AsterixParquetWriter.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-simple/parquet-simple.04.query.sqlpp
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/ErrorCode.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/copy-to/parquet-simple/parquet-simple.04.adm
M 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataConstants.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-simple/parquet-simple.02.update.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/copy-to/parquet-tweet/parquet-tweet.05.adm
M asterixdb/asterix-common/src/main/resources/asx_errormsg/en.properties
A 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/writer/printer/ParquetExternalFilePrinterFactory.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/copy-to/parquet-tweet/parquet-tweet.05.query.sqlpp
A 
asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/parquet/ParquetRecordLazyVisitor.java
28 files changed, 1,464 insertions(+), 16 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/09/18209/23
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18209
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I40dc16969e66af09cde04b460f441af666b39d51
Gerrit-Change-Number: 18209
Gerrit-PatchSet: 23
Gerrit-Owner: preetham.polupar...@couchbase.com
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-CC: Wail Alkowaileet 
Gerrit-Attention: preetham.polupar...@couchbase.com
Gerrit-MessageType: newpatchset


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Ali Alsuliman :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Ali Alsuliman has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 3:

(1 comment)

File asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/e742fb32_2dd832a4
PS2, Line 204: * any other non-array and non-multiset input value will cause a 
type error,
> Done. This doesn't match what it currently says for array_max and array_min. 
> […]
Yes, please.
I went through all of them to make sure they are correct.
Several are out of sync. For most of them, we stopped throwing an error. Here 
is what needs to change:
* `null` is returned if the input is `null` or `missing` -> 0 is returned
* any other non-array and non-multiset input value will cause an error -> 0 is 
returned if the input is not an array or a multiset
array_count();

* any other non-array and non-multiset input value will cause a type error -> 
`null` is returned if the input is not an array or a multiset
* any other non-numeric value in the input collection will cause a type error 
-> any other non-numeric value in the input collection will be ignored
array_avg();

* any other non-array and non-multiset input value will cause a type error -> 
`null` is returned if the input is not an array or a multiset
* any other non-numeric value in the input collection will cause a type error 
-> any other non-numeric value in the input collection will be ignored
array_sum( [1.2, 2.3, 3.4, 0, null, missing] );

* any other non-array and non-multiset input value will cause a type error -> 
`null` is returned if the input is not an array or a multiset
* multiple incomparable items in the input array or multiset will cause a type 
error -> `null` is returned if there are incomparable items in the input array 
or multiset
array_min( [1.2, 2.3, 3.4] );
array_max( [1.2, 2.3, 3.4, 0, null, missing] );
strict_min();
strict_max();

* any other non-array and non-multiset input value will cause a type error -> 
`null` is returned if the input is not an array or a multiset
array_stddev_samp()
array_stddev_pop()
array_var_samp()
array_var_pop()
array_skewness()
array_kurtosis()

* `null` is returned if the input is `null` or `missing` -> 0 is returned
strict_count();

* any other non-array and non-multiset input value will cause a type error -> 
`null` is returned if the input is not an array or a multiset
* any other non-numeric value in the input collection will cause a type error 
-> 'null' is returned
strict_avg();
strict_sum();



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 3
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 18:08:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ali Alsuliman 
Comment-In-Reply-To: Simon Dew 
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 3: Contrib-2

Analytics Compatibility Tests Failed
https://cbjenkins.page.link/325ZqTXbyaofPNzc7 : UNSTABLE


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 3
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 18:08:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[master]: [ASTERIXDB-3358][COMP] Indexnl hint with index names not working corr...

2024-04-24 Thread AsterixDB Code Review
>From Vijay Sarathy :

Attention is currently required from: Ali Alsuliman.
Vijay Sarathy has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18177 )

Change subject: [ASTERIXDB-3358][COMP] Indexnl hint with index names not 
working correctly.
..


Patch Set 14: Code-Review+1


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18177
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I603ae267efd137d4e9f3491be2a6bdcb1179eeac
Gerrit-Change-Number: 18177
Gerrit-PatchSet: 14
Gerrit-Owner: Vijay Sarathy 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Vijay Sarathy 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Comment-Date: Wed, 24 Apr 2024 17:51:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Jenkins :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 3: Integration-Tests-1

Integration Tests Failed

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-trigger/361/ : UNSTABLE


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 3
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 16:58:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
Attention is currently required from: Murtadha Hubail, Ali Alsuliman.
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 3:

Analytics Compatibility Compilation Successful
https://cbjenkins.page.link/KFZ3yTkdXAxasDfE7 : SUCCESS


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 3
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Comment-Date: Wed, 24 Apr 2024 16:23:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Simon Dew :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman.
Simon Dew has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 3:

(9 comments)

Patchset:

PS2:
> We should highlight somewhere in the "Window Functions" section that median() 
> as a window function s […]
Done


Patchset:

PS3:
Updates after review of patch set 2


File asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/b49bb0c7_c1e39c10
PS2, Line 185: Gets the median value of the non-null and non-missing numeric 
items in the given collection.
> I would say: […]
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/b7b1d77e_ad38fcd0
PS2, Line 193: expression
> 'clause' instead of 'expression'.
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/35e2a5c2_c165020f
PS2, Line 197: an `array` or `multiset`
> of numbers.
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/48b78ee5_f49adc43
PS2, Line 201: non-null and non-missing numbers
> Maybe simpler to say "numeric items".
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/c3104bef_3c860cd3
PS2, Line 203: any non-null and non-missing items
> "any numeric items".
Done


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/fda9d47c_85544725
PS2, Line 204: * any other non-array and non-multiset input value will cause a 
type error,
> We actually return "null" similar to array_min(), array_max() and the like.
Done. This doesn't match what it currently says for array_max and array_min. Do 
you need me to update the other function results?


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/18bfe5fb_4feb3b3e
PS2, Line 205: will cause a type error.
> "will be ignored". […]
Done



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 3
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Comment-Date: Wed, 24 Apr 2024 16:13:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ali Alsuliman 
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Simon Dew :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Hello Murtadha Hubail, Ali Alsuliman, Jenkins, Anon. E. Moose #1000171,

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

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251

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

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..

DOC-12137: Add ARRAY_MEDIAN() Function

... and associated MEDIAN() aggregation pseudo-function.

Add ARRAY_MEDIAN to the builtin functions
Add MEDIAN to aggregation pseudo-functions
Fix typo: SKEWENESS → SKEWNESS
Fix order of aggregation pseudo-function table
Update details of OVER clause with aggregate functions

Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
---
M asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
M asterixdb/asterix-doc/src/main/markdown/sqlpp/4_windowfunctions.md
M asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
3 files changed, 64 insertions(+), 8 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/51/18251/3
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 3
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-MessageType: newpatchset


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 2: Contrib-2

Analytics Compatibility Tests Failed
https://cbjenkins.page.link/hMVTrvWrNkbgSh657 : UNSTABLE


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 2
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 15:48:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[master]: Add metrics

2024-04-24 Thread AsterixDB Code Review
>From Hussain Towaileb :

Hussain Towaileb has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18252 )


Change subject: Add metrics
..

Add metrics

Change-Id: I2a25322c5e3ca9b33d5c1bdc2594d1f6c833c801
---
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/IJobManager.java
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobManager.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestCapacityController.java
M 
hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java
4 files changed, 43 insertions(+), 1 deletion(-)



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

diff --git 
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/IJobManager.java
 
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/IJobManager.java
index b2795d4..f8f3e5d 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/IJobManager.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/IJobManager.java
@@ -130,4 +130,9 @@
  * @return the maximum number of jobs to queue before rejecting new jobs
  */
 int getJobQueueCapacity();
+
+/**
+ * @return total jobs count
+ */
+int getTotalJobsCount();
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobManager.java
 
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobManager.java
index 4882f4a..79cff64 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobManager.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/job/JobManager.java
@@ -30,6 +30,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;

 import org.apache.hyracks.api.exceptions.ErrorCode;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -66,11 +67,13 @@
 private final Map runMapArchive;
 private final Map> runMapHistory;
 private final IJobCapacityController jobCapacityController;
+private final AtomicInteger totalJobsCount;
 private IJobQueue jobQueue;

 public JobManager(CCConfig ccConfig, ClusterControllerService ccs, 
IJobCapacityController jobCapacityController) {
 this.ccs = ccs;
 this.jobCapacityController = jobCapacityController;
+this.totalJobsCount = new AtomicInteger();
 try {
 Constructor jobQueueConstructor = 
this.getClass().getClassLoader().loadClass(ccConfig.getJobQueueClass())
 .getConstructor(IJobManager.class, 
IJobCapacityController.class);
@@ -107,6 +110,7 @@
 @Override
 public void add(JobRun jobRun) throws HyracksException {
 checkJob(jobRun);
+incrementJobsTotalCount();
 JobSpecification job = jobRun.getJobSpecification();
 IJobCapacityController.JobSubmissionStatus status = 
jobCapacityController.allocate(job);
 CCServiceContext serviceCtx = ccs.getContext();
@@ -301,6 +305,11 @@
 return ccs.getCCConfig().getJobQueueCapacity();
 }

+@Override
+public int getTotalJobsCount() {
+return totalJobsCount.get();
+}
+
 private void pickJobsToRun() throws HyracksException {
 List selectedRuns = jobQueue.pull();
 for (JobRun run : selectedRuns) {
@@ -356,4 +365,8 @@
 final JobSpecification job = jobRun.getJobSpecification();
 jobCapacityController.release(job);
 }
+
+private void incrementJobsTotalCount() {
+totalJobsCount.incrementAndGet();
+}
 }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestCapacityController.java
 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestCapacityController.java
index 3ab2ab9..351365c 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestCapacityController.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpRequestCapacityController.java
@@ -52,13 +52,14 @@
 @Override
 public void channelRead(ChannelHandlerContext ctx, Object msg) throws 
Exception {
 if (overloaded) {
+incrementRejectedRequestsCount();
 

Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Jenkins :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 2: Integration-Tests-1

Integration Tests Failed

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-trigger/358/ : UNSTABLE


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 2
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 14:49:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Ali Alsuliman :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Ali Alsuliman has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 2:

(8 comments)

Patchset:

PS2:
We should highlight somewhere in the "Window Functions" section that median() 
as a window function supports only PARTITION BY clause, but not ORDER BY or 
FRAME specification.


File asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/3c7e4f55_a208360d
PS2, Line 185: Gets the median value of the non-null and non-missing numeric 
items in the given collection.
I would say:
Gets the median value of the numeric items in the given collection ignoring 
NULLs, MISSINGs, and non-numeric items.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/e976099d_f828a46a
PS2, Line 193: expression
'clause' instead of 'expression'.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/3beb79b8_e77fa95f
PS2, Line 197: an `array` or `multiset`
of numbers.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/af79e933_d24b0218
PS2, Line 201: non-null and non-missing numbers
Maybe simpler to say "numeric items".


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/aa5885e7_21c78904
PS2, Line 203: any non-null and non-missing items
"any numeric items".


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/a290bf71_a677a6d0
PS2, Line 204: * any other non-array and non-multiset input value will cause a 
type error,
We actually return "null" similar to array_min(), array_max() and the like.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251/comment/11cb348d_7f9a1738
PS2, Line 205: will cause a type error.
"will be ignored".
If you prefer, we can actually remove this bullet point because it's already 
covered above.



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 2
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Ali Alsuliman 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 13:56:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
Attention is currently required from: Murtadha Hubail, Ali Alsuliman.
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 2:

Analytics Compatibility Compilation Successful
https://cbjenkins.page.link/qh77cb63gWLwijfv5 : SUCCESS


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 2
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Comment-Date: Wed, 24 Apr 2024 13:51:02 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Simon Dew :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman.
Simon Dew has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 2:

(1 comment)

Patchset:

PS2:
Patch set 2: Fix order of aggregation pseudo-function table



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 2
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Comment-Date: Wed, 24 Apr 2024 13:41:40 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Simon Dew :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Hello Murtadha Hubail, Ali Alsuliman, Jenkins, Anon. E. Moose #1000171,

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

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251

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

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..

DOC-12137: Add ARRAY_MEDIAN() Function

... and associated MEDIAN() aggregation pseudo-function.

Add ARRAY_MEDIAN to the builtin functions
Add MEDIAN to aggregation pseudo-functions
Fix typo: SKEWENESS → SKEWNESS
Fix order of pseudo-aggregation table

Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
---
M asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
M asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
2 files changed, 60 insertions(+), 6 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/51/18251/2
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 2
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-MessageType: newpatchset


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 1: Contrib-2

Analytics Compatibility Tests Failed
https://cbjenkins.page.link/JWrmpz251yYCit9v7 : UNSTABLE


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 1
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 13:27:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Jenkins :

Attention is currently required from: Murtadha Hubail, Ali Alsuliman, Simon Dew.
Jenkins has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 1: Integration-Tests-1

Integration Tests Failed

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-trigger/357/ : UNSTABLE


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 1
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Attention: Simon Dew 
Gerrit-Comment-Date: Wed, 24 Apr 2024 12:33:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[trinity]: [ASTERIXDB-3343][API] Add servlet to get completed requests

2024-04-24 Thread AsterixDB Code Review
>From Ali Alsuliman :

Attention is currently required from: Murtadha Hubail, Michael Blow.
Ali Alsuliman has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18109 )

Change subject: [ASTERIXDB-3343][API] Add servlet to get completed requests
..


Patch Set 1: Code-Review+1


--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18109
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: trinity
Gerrit-Change-Id: I9bd395a75970abe01a4fab0a88abcae4df881564
Gerrit-Change-Number: 18109
Gerrit-PatchSet: 1
Gerrit-Owner: Ali Alsuliman 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Michael Blow 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Michael Blow 
Gerrit-Comment-Date: Wed, 24 Apr 2024 12:03:28 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
Attention is currently required from: Murtadha Hubail, Ali Alsuliman.
Anon. E. Moose #1000171 has posted comments on this change. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )

Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..


Patch Set 1:

Analytics Compatibility Compilation Successful
https://cbjenkins.page.link/eUWp9xWju3Kd1tSu5 : SUCCESS


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
Gerrit-Change-Number: 18251
Gerrit-PatchSet: 1
Gerrit-Owner: Simon Dew 
Gerrit-Reviewer: Ali Alsuliman 
Gerrit-Reviewer: Murtadha Hubail 
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-CC: Jenkins 
Gerrit-Attention: Murtadha Hubail 
Gerrit-Attention: Ali Alsuliman 
Gerrit-Comment-Date: Wed, 24 Apr 2024 11:41:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in asterixdb[neo]: DOC-12137: Add ARRAY_MEDIAN() Function

2024-04-24 Thread AsterixDB Code Review
>From Simon Dew :

Simon Dew has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18251 )


Change subject: DOC-12137: Add ARRAY_MEDIAN() Function
..

DOC-12137: Add ARRAY_MEDIAN() Function

... and associated MEDIAN() aggregation pseudo-function.

Add ARRAY_MEDIAN to the builtin functions
Add MEDIAN to aggregation pseudo-functions
Fix typo: SKEWENESS → SKEWNESS

Change-Id: Icb6459ea616244a048ed95757b3a0eb9094ba85a
---
M asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
M asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
2 files changed, 55 insertions(+), 2 deletions(-)



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

diff --git 
a/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md 
b/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
index 0657fb0..2cf493b 100644
--- a/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/9_aggregate_sql.md
@@ -177,6 +177,43 @@
 3.4


+### array_median ###
+ * Syntax:
+
+array_median(num_collection)
+
+ * Gets the median value of the non-null and non-missing numeric items in the 
given collection.
+
+   The function starts by sorting the numeric items.
+
+ - If there is an odd number of numeric items, the function returns the 
item that is exactly in the middle of the range: that is, it has the same 
number of items before and after.
+ - If there is an even number of numeric items, the function returns the 
mean of the two items that are exactly in the middle of the range.
+
+ * Note: You cannot use the `DISTINCT` keyword with this function, or with the 
`median` aggregation pseudo-function.
+   The `median` aggregation pseudo-function does support the `FILTER` 
expression.
+   There is no `strict_median` function corresponding to this function.
+ * Arguments:
+* `num_collection` could be:
+* an `array` or `multiset`,
+* or, a `null` value,
+* or, a `missing` value.
+ * Return Value:
+* a `double` value representing the median of the non-null and non-missing 
numbers in the given collection,
+* `null` is returned if the input is `null` or `missing`,
+* `null` is returned if the given collection does not contain any non-null 
and non-missing items,
+* any other non-array and non-multiset input value will cause a type error,
+* any other non-numeric value in the input collection will cause a type 
error.
+ * Example:
+
+   { "v1": array_median( [1.2, 2.3, 3.4, 0, null, missing],
+ "v2": array_median( [1.2, 2.3, 3.4, 4.5, 0, null, missing] ) };
+
+ * The expected result is:
+
+   { "v1": 1.75,
+ "v2": 2.3 }
+
+
 ### array_stddev_samp ###

  * Syntax:
diff --git a/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md 
b/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
index 04a65d1..a1b9aca 100644
--- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
+++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
@@ -1215,7 +1215,7 @@

 For example, `SELECT COUNT(*) FROM customers` simply returns the total number 
of customers, whereas `SELECT COUNT(rating) FROM customers` returns the number 
of customers who have known ratings (that is, their ratings are not `null` or 
`missing`).

-Because the aggregation pseudo-functions sometimes restructure their operands, 
they can be used only in query blocks where (explicit or implicit) grouping is 
being done. Therefore the pseudo-functions cannot operate directly on arrays or 
multisets. For operating directly on JSON collections, SQL++ provides a set of 
ordinary functions for computing aggregations. Each ordinary aggregation 
function (except the ones corresponding to `COUNT` and `ARRAY_AGG`) has two 
versions: one that ignores `null` and `missing` values and one that returns 
`null` if a `null` or `missing` value is encountered anywhere in the 
collection. The names of the aggregation functions are as follows:
+Because the aggregation pseudo-functions sometimes restructure their operands, 
they can be used only in query blocks where (explicit or implicit) grouping is 
being done. Therefore the pseudo-functions cannot operate directly on arrays or 
multisets. For operating directly on JSON collections, SQL++ provides a set of 
ordinary functions for computing aggregations. Each ordinary aggregation 
function (except as noted below) has two versions: one that ignores `null` and 
`missing` values, and one that returns `null` if a `null` or `missing` value is 
encountered anywhere in the collection. The names of the aggregation functions 
are as follows:

 | Aggregation pseudo-function; operates on groups only | Ordinary function: 
Ignores NULL or MISSING values | Ordinary function: Returns NULL if NULL or 
MISSING are encountered|