This is an automated email from the ASF dual-hosted git repository.

mblow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 498c59d4c0 [ASTERIXDB-3361][CONF] Add Containerfile and Podman plugin
498c59d4c0 is described below

commit 498c59d4c0e5f8197f0b51746b26dbd2cbe7d8fa
Author: Ian Maxon <[email protected]>
AuthorDate: Tue Jul 29 15:56:41 2025 -0700

    [ASTERIXDB-3361][CONF] Add Containerfile and Podman plugin
    
    Details:
    - Add containerfile and way to build container as part of build to
    allow containerized distribution
    - updated conf files and documentation
    
    Co-authored-by: Suryaa Charan Shivakumar <[email protected]>
    Change-Id: Ibdacf4e6b156a3b6ef15b4420a4102c122f8af1d
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18183
    Contrib: Ian Maxon <[email protected]>
    Integration-Tests: Jenkins <[email protected]>
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Michael Blow <[email protected]>
---
 .../asterix/hyracks/bootstrap/CCNCApplication.java |  92 +++++++++++
 asterixdb/asterix-doc/src/site/markdown/podman.md  | 175 ++++++++++++++++++++
 .../src/site/markdown/sqlpp/primer-sqlpp.md        | 178 +++++++++++----------
 .../asterix-doc/src/site/resources/data/chm.adm    |  24 +--
 .../asterix-doc/src/site/resources/data/gbm.adm    |  30 ++--
 asterixdb/asterix-doc/src/site/site.xml            |   1 +
 asterixdb/asterix-podman/pom.xml                   |  64 ++++++++
 .../src/main/resources/Containerfile               |  49 ++++++
 .../src/main/resources/entrypoint.sh               |  42 +++++
 .../src/test/resources/socktest/Containerfile      |  27 ++--
 asterixdb/asterix-server/pom.xml                   |  11 ++
 asterixdb/asterix-server/src/conf/cc.conf          |  27 ++++
 .../src/main/assembly/binary-assembly.xml          |   6 +
 13 files changed, 602 insertions(+), 124 deletions(-)

diff --git 
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCNCApplication.java
 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCNCApplication.java
new file mode 100644
index 0000000000..39011574cf
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCNCApplication.java
@@ -0,0 +1,92 @@
+/*
+ * 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.hyracks.bootstrap;
+
+import java.util.Arrays;
+
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.hyracks.control.cc.ClusterControllerService;
+import org.apache.hyracks.control.common.config.ConfigManager;
+import org.apache.hyracks.control.common.config.ConfigUtils;
+import org.apache.hyracks.control.common.controllers.CCConfig;
+import org.apache.hyracks.control.common.controllers.NCConfig;
+import org.apache.hyracks.control.nc.NodeControllerService;
+
+public class CCNCApplication {
+
+    ClusterControllerService ccSvc;
+    NodeControllerService ncSvc;
+
+    public static void main(String[] args) throws Exception {
+        CCNCApplication apps = new CCNCApplication();
+        apps.createServices(args);
+        apps.startServices();
+        while (true) {
+            Thread.sleep(10000);
+        }
+    }
+
+    public void createServices(String[] args) throws Exception {
+        int ccArgIdx = ArrayUtils.indexOf(args, "--cc");
+        int ncArgIdx = ArrayUtils.indexOf(args, "--nc");
+        int[] allIdx = ArrayUtils.removeAllOccurrences(new int[] { ccArgIdx, 
ncArgIdx }, -1);
+        Arrays.sort(allIdx);
+        final ConfigManager cfgMgr = new ConfigManager(getArgs(args, ncArgIdx, 
allIdx));
+        String nodeId = ConfigUtils.getOptionValue(getArgs(args, ncArgIdx, 
allIdx), NCConfig.Option.NODE_ID);
+        NCApplication ncApp = new NCApplication();
+        ncApp.registerConfig(cfgMgr);
+        NCConfig ncCfg = new NCConfig(nodeId, cfgMgr);
+        cfgMgr.processConfig();
+        ncSvc = new NodeControllerService(ncCfg, ncApp);
+        createCC(getArgs(args, ccArgIdx, allIdx), ncSvc);
+    }
+
+    public void createCC(String[] args, NodeControllerService ncSvc) throws 
Exception {
+        String nodeId = ncSvc.getId();
+        CCApplication ccApp = new CCApplication();
+        final ConfigManager cfgMgr = new ConfigManager(args);
+        ccApp.registerConfig(cfgMgr);
+        CCConfig ccCfg = new CCConfig(cfgMgr);
+        cfgMgr.processConfig();
+        cfgMgr.ensureNode(nodeId);
+        ccSvc = new ClusterControllerService(ccCfg, ccApp);
+    }
+
+    private String[] getArgs(String[] args, int idx, int[] allIdx) {
+        String[] subArgs = ArrayUtils.subarray(args, idx + 1, getEnd(idx, 
allIdx));
+        if (allIdx[0] != 0) {
+            subArgs = ArrayUtils.addAll(subArgs, ArrayUtils.subarray(args, 0, 
allIdx[0]));
+        }
+        return subArgs;
+    }
+
+    private int getEnd(int idx, int[] idxes) {
+        int cut = Arrays.binarySearch(idxes, idx + 1);
+        if (cut >= 0) {
+            return cut + 1;
+        }
+        cut = -cut - 1;
+        return cut >= idxes.length ? Integer.MAX_VALUE : idxes[cut];
+    }
+
+    public void startServices() throws Exception {
+        ccSvc.start();
+        ncSvc.start();
+    }
+}
diff --git a/asterixdb/asterix-doc/src/site/markdown/podman.md 
b/asterixdb/asterix-doc/src/site/markdown/podman.md
new file mode 100644
index 0000000000..e66f1d78d4
--- /dev/null
+++ b/asterixdb/asterix-doc/src/site/markdown/podman.md
@@ -0,0 +1,175 @@
+<!--
+ ! 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.
+!-->
+
+# Running AsterixDB via Podman #
+
+> **Note:** Make sure to install and set up Podman before proceeding. This 
setup will not work without it. For installation instructions, [see the links 
section](#links).
+
+## <a id="toc">Table of Contents</a> ##
+
+* [Building the Image](#build)
+* [Pulling the Image](#pull)
+* [Running AsterixDB](#run)
+* [Using Detached Mode](#detached)
+* [Stopping the Container](#stop)
+* [Using a Custom Config](#config)
+* [Pushing Images](#registry)
+* [Useful Links](#links)
+* [Available Configuration Parameters](ncservice.html#Parameters)
+
+
+# <a id="build">Building the Image</a>
+
+To build the Podman-compatible container image for AsterixDB, use the 
following Maven command:
+Pre-requisite install and setup Podman, [see](#links). Or else this will not 
work
+```bash
+mvn clean package -Ppodman.img
+```
+
+This will build the server, copy required resources, and create an image using 
the Podman engine. The image will be tagged as `apache/asterixdb:latest` by 
default.
+
+If the base image is not available locally, ensure the build pulls it:
+
+```bash
+podman build --pull -t apache/asterixdb .
+```
+
+
+# <a id="pull">Pulling the Image</a>
+
+If you only want to run AsterixDB and do not need to build it from source, you 
can simply pull the prebuilt image from the registry:
+
+```bash
+podman pull apache/asterixdb:latest
+```
+
+This will retrieve the latest tagged image. You can use it directly with 
`podman run` without needing to compile or build anything yourself.
+
+For reproducible deployments, prefer using versioned tags (e.g., 
`apache/asterixdb:0.9.10`) instead of `latest`.
+
+
+# <a id="run">Running AsterixDB</a>
+
+You can run AsterixDB in standalone mode using the following command:
+
+```bash
+podman run \
+  -p 19001:19001 \
+  -p 19002:19002 \
+  -p 19004:19004 \
+  -p 19006:19006 \
+  -p 19007:19007 \
+  -p 1098:1098 \
+  -p 1099:1099 \
+  apache/asterixdb
+```
+
+This will start AsterixDB with a default configuration exposing the Web UI, 
REST API, Node Controller etc. The Web interface will be available at: 
[http://localhost:19006](http://localhost:19006)
+
+# <a id="detached">Using Detached Mode</a>
+
+To run AsterixDB in the background (detached mode):
+
+```bash
+podman run -d \
+  -p 19001:19001 \
+  -p 19002:19002 \
+  -p 19004:19004 \
+  -p 19006:19006 \
+  -p 19007:19007 \
+  -p 1098:1098 \
+  -p 1099:1099 \
+  apache/asterixdb
+```
+
+> **Tip:** Use `--rm` with `podman run` to automatically clean up the 
container after it stops.  
+> This is especially useful for development, testing, and teaching scenarios 
where containers are short-lived and don't need to persist.
+> 
+> **Tip:** Use `--name` with `podman run` to assign a custom name to your 
container.  
+> This makes it easier to reference the container in commands like `podman 
logs`, `podman exec`, or `podman restart` without needing to remember the 
container ID.
+
+You can verify the container is running:
+
+```bash
+podman ps
+```
+To view the container’s output logs, use:
+
+```bash
+podman logs <container-name-or-id>
+```
+
+You can use either the container’s name (if you specified one using --name) or 
the container ID shown in podman ps.
+This is useful for basic debugging.
+
+You can enter a shell inside the running container with:
+
+```bash
+podman exec -it <container-name-or-id> sh
+```
+
+  Once inside, the default home directory is:
+
+```bash
+/var/lib/asterix
+```
+
+# <a id="stop">Stopping the Container</a>
+
+To stop the running AsterixDB container:
+
+```bash
+podman stop <container-id>
+```
+
+You can find the container ID using `podman ps`.
+
+
+# <a id="config">Using a Custom Config</a>
+
+You can override the default configuration by mounting your own configuration 
file and passing it to the container:
+
+```bash
+podman run \
+  -v $(pwd)/my-conf:/config \
+  -p 19001:19001 -p 19002:19002 -p 19004:19004 -p 19006:19006 -p 19007:19007 
-p 1098:1098 -p 1099:1099 \
+  apache/asterixdb \
+  -config-file /config/cc.conf
+```
+
+The `-v $(pwd)/my-conf:/config` flag mounts a local directory named `my-conf` 
(located in your current working directory) into the container at `/config`. 
This allows AsterixDB to use your custom configuration file (`cc.conf`) without 
modifying the container. Make sure `my-conf/cc.conf` exists before running the 
command.
+All available parameters and their usage can be found 
[here](ncservice.html#Parameters)
+
+# <a id="registry">Pushing Images</a>
+
+You can tag and push your local image to a container registry. Replace 
`docker.io/your-username` with your actual registry path (e.g., Docker Hub, 
GitHub Container Registry, etc.). The `:custom` tag indicates a custom version 
of the image you built locally — you can name it anything meaningful, such as 
`:dev` or `:2025-04-11`:
+```bash
+podman tag apache/asterixdb docker.io/your-username/asterixdb:custom
+podman push docker.io/your-username/asterixdb:custom
+```
+
+Use version tags (e.g., `apache/asterixdb:0.9.10`) for official releases 
instead of `latest` to ensure reproducibility.
+
+
+# <a id="links">Useful Links</a>
+
+- [Podman Installation Guide](https://podman.io/docs/installation)
+- [Podman Documentation](https://docs.podman.io/en/latest/)
+- [Available Configuration Parameters](ncservice.html#Parameters)
+
diff --git a/asterixdb/asterix-doc/src/site/markdown/sqlpp/primer-sqlpp.md 
b/asterixdb/asterix-doc/src/site/markdown/sqlpp/primer-sqlpp.md
index 2d78b01f07..02831ef956 100644
--- a/asterixdb/asterix-doc/src/site/markdown/sqlpp/primer-sqlpp.md
+++ b/asterixdb/asterix-doc/src/site/markdown/sqlpp/primer-sqlpp.md
@@ -85,7 +85,7 @@ Chirp users, their Chirps, Gleambook users, their users' 
employment information,
 some of the key features of AsterixDB. :-)) As a point of information, SQL++ 
is case-insensitive
 for both keywords and built-in type names, so the exact style of the examples 
below is just one of
 a number of possibilities.
-
+```
         DROP DATAVERSE TinySocial IF EXISTS;
         CREATE DATAVERSE TinySocial;
         USE TinySocial;
@@ -102,7 +102,7 @@ a number of possibilities.
         CREATE TYPE ChirpMessageType AS closed {
             chirpId: string,
             user: ChirpUserType,
-            senderLocation: point?,
+            senderLocation: geometry?,
             sendTime: datetime,
             referredTopics: {{ string }},
             messageText: string
@@ -127,9 +127,10 @@ a number of possibilities.
             messageId: int,
             authorId: int,
             inResponseTo: int?,
-            senderLocation: point?,
+            senderLocation: geometry?,
             message: string
         };
+```
 
 The first three lines above tell AsterixDB to drop the old TinySocial 
dataverse, if one already
 exists, and then to create a brand new one and make it the focus of the 
statements that follow.
@@ -141,7 +142,7 @@ Interestingly (based on one of Chirp's APIs), each Chirp 
message actually embeds
 sending user's information (current as of when the message was sent), so this 
is an example of a nested
 object in ADM.
 Chirp messages can optionally contain the sender's location, which is modeled 
via the senderLocation
-field of spatial type _point_; the question mark following the field type 
indicates its optionality.
+field of spatial type _geometry_; the question mark following the field type 
indicates its optionality.
 An optional field is like a nullable field in SQL---it may be present or 
missing, but when it's present,
 its value's data type will conform to the datatype's specification.
 The sendTime field illustrates the use of a temporal primitive type, 
_datetime_.
@@ -172,7 +173,7 @@ The only fields that _must_ be specified a priori are the 
primary key fields of
 Now that we have defined our datatypes, we can move on and create datasets to 
store the actual data.
 (If we wanted to, we could even have several named datasets based on any one 
of these datatypes.)
 We can do this as follows, utilizing the SQL++ DDL capabilities of AsterixDB.
-
+```
         USE TinySocial;
 
         CREATE DATASET GleambookUsers(GleambookUserType)
@@ -192,10 +193,7 @@ We can do this as follows, utilizing the SQL++ DDL 
capabilities of AsterixDB.
         CREATE INDEX gbAuthorIdx on GleambookMessages(authorId) TYPE btree;
         CREATE INDEX gbSenderLocIndex on GleambookMessages(senderLocation) 
TYPE rtree;
         CREATE INDEX gbMessageIdx on GleambookMessages(message) TYPE keyword;
-
-        SELECT VALUE ds FROM Metadata.`Dataset` ds;
-        SELECT VALUE ix FROM Metadata.`Index` ix;
-
+```
 The SQL++ DDL statements above create four datasets for holding our social 
data in the TinySocial
 dataverse: GleambookUsers, GleambookMessages, ChirpUsers, and ChirpMessages.
 The first _CREATE DATASET_ statement creates the GleambookUsers data set.
@@ -225,9 +223,13 @@ In addition to btree, _rtree_ and inverted _keyword_ 
indexes are supported by As
 Indexes can also have composite keys, and more advanced text indexing is 
available as well
 (ngram(k), where k is the desired gram length).
 
-### Querying the Metadata Dataverse ###
+```
+        SELECT VALUE ds FROM Metadata.`Dataset` ds;
+        SELECT VALUE ix FROM Metadata.`Index` ix;
+```
 
-The last two statements above show how you can use queries in SQL++ to examine 
the AsterixDB
+### Querying the Metadata Dataverse ###
+The above two statements above show how you can use queries in SQL++ to 
examine the AsterixDB
 system catalogs and tell what artifacts you have created.
 Just as relational DBMSs use their own tables to store their catalogs, 
AsterixDB uses
 its own datasets to persist descriptions of its datasets, datatypes, indexes, 
and so on.
@@ -276,18 +278,18 @@ of the data instances will be stored separately from 
their associated field name
 
         INSERT INTO ChirpMessages
         ([
-        
{"chirpId":"1","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("47.44,80.65"),"sendTime":datetime("2008-04-26T10:10:00"),"referredTopics":{{"product-z","customization"}},"messageText":"
 love product-z its customization is good:)"},
-        
{"chirpId":"2","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":point("32.84,67.14"),"sendTime":datetime("2010-05-13T10:10:00"),"referredTopics":{{"ccast","shortcut-menu"}},"messageText":"
 like ccast its shortcut-menu is awesome:)"},
-        
{"chirpId":"3","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("29.72,75.8"),"sendTime":datetime("2006-11-04T10:10:00"),"referredTopics":{{"product-w","speed"}},"messageText":"
 like product-w the speed is good:)"},
-        
{"chirpId":"4","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("39.28,70.48"),"sendTime":datetime("2011-12-26T10:10:00"),"referredTopics":{{"product-b","voice-command"}},"messageText":"
 like product-b the voice-command is mind-blowing:)"},
-        
{"chirpId":"5","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("40.09,92.69"),"sendTime":datetime("2006-08-04T10:10:00"),"referredTopics":{{"product-w","speed"}},"messageText":"
 can't stand product-w its speed is terrible:("},
-        
{"chirpId":"6","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":point("47.51,83.99"),"sendTime":datetime("2010-05-07T10:10:00"),"referredTopics":{{"x-phone","voice-clarity"}},"messageText":"
 like x-phone the voice-clarity is good:)"},
-        
{"chirpId":"7","user":{"screenName":"ChangEwing_573","lang":"en","friendsCount":182,"statusesCount":394,"name":"Chang
 
Ewing","followersCount":32136},"senderLocation":point("36.21,72.6"),"sendTime":datetime("2011-08-25T10:10:00"),"referredTopics":{{"product-y","platform"}},"messageText":"
 like product-y the platform is good"},
-        
{"chirpId":"8","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("46.05,93.34"),"sendTime":datetime("2005-10-14T10:10:00"),"referredTopics":{{"product-z","shortcut-menu"}},"messageText":"
 like product-z the shortcut-menu is awesome:)"},
-        
{"chirpId":"9","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("36.86,74.62"),"sendTime":datetime("2012-07-21T10:10:00"),"referredTopics":{{"ccast","voicemail-service"}},"messageText":"
 love ccast its voicemail-service is awesome"},
-        
{"chirpId":"10","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":point("29.15,76.53"),"sendTime":datetime("2008-01-26T10:10:00"),"referredTopics":{{"ccast","voice-clarity"}},"messageText":"
 hate ccast its voice-clarity is OMG:("},
-        
{"chirpId":"11","user":{"screenName":"NilaMilliron_tw","lang":"en","friendsCount":445,"statusesCount":164,"name":"Nila
 
Milliron","followersCount":22649},"senderLocation":point("37.59,68.42"),"sendTime":datetime("2008-03-09T10:10:00"),"referredTopics":{{"x-phone","platform"}},"messageText":"
 can't stand x-phone its platform is terrible"},
-        
{"chirpId":"12","user":{"screenName":"OliJackson_512","lang":"en","friendsCount":445,"statusesCount":164,"name":"Oli
 
Jackson","followersCount":22649},"senderLocation":point("24.82,94.63"),"sendTime":datetime("2010-02-13T10:10:00"),"referredTopics":{{"product-y","voice-command"}},"messageText":"
 like product-y the voice-command is amazing:)"}
+        
{"chirpId":"1","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(47.44,80.65),"sendTime":datetime("2008-04-26T10:10:00"),"referredTopics":{{"product-z","customization"}},"messageText":"
 love product-z its customization is good:)"},
+        
{"chirpId":"2","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":st_make_point(32.84,67.14),"sendTime":datetime("2010-05-13T10:10:00"),"referredTopics":{{"ccast","shortcut-menu"}},"messageText":"
 like ccast its shortcut-menu is awesome:)"},
+        
{"chirpId":"3","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(29.72,75.8),"sendTime":datetime("2006-11-04T10:10:00"),"referredTopics":{{"product-w","speed"}},"messageText":"
 like product-w the speed is good:)"},
+        
{"chirpId":"4","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(39.28,70.48),"sendTime":datetime("2011-12-26T10:10:00"),"referredTopics":{{"product-b","voice-command"}},"messageText":"
 like product-b the voice-command is mind-blowing:)"},
+        
{"chirpId":"5","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(40.09,92.69),"sendTime":datetime("2006-08-04T10:10:00"),"referredTopics":{{"product-w","speed"}},"messageText":"
 can't stand product-w its speed is terrible:("},
+        
{"chirpId":"6","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":st_make_point(47.51,83.99),"sendTime":datetime("2010-05-07T10:10:00"),"referredTopics":{{"x-phone","voice-clarity"}},"messageText":"
 like x-phone the voice-clarity is good:)"},
+        
{"chirpId":"7","user":{"screenName":"ChangEwing_573","lang":"en","friendsCount":182,"statusesCount":394,"name":"Chang
 
Ewing","followersCount":32136},"senderLocation":st_make_point(36.21,72.6),"sendTime":datetime("2011-08-25T10:10:00"),"referredTopics":{{"product-y","platform"}},"messageText":"
 like product-y the platform is good"},
+        
{"chirpId":"8","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(46.05,93.34),"sendTime":datetime("2005-10-14T10:10:00"),"referredTopics":{{"product-z","shortcut-menu"}},"messageText":"
 like product-z the shortcut-menu is awesome:)"},
+        
{"chirpId":"9","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(36.86,74.62),"sendTime":datetime("2012-07-21T10:10:00"),"referredTopics":{{"ccast","voicemail-service"}},"messageText":"
 love ccast its voicemail-service is awesome"},
+        
{"chirpId":"10","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":st_make_point(29.15,76.53),"sendTime":datetime("2008-01-26T10:10:00"),"referredTopics":{{"ccast","voice-clarity"}},"messageText":"
 hate ccast its voice-clarity is OMG:("},
+        
{"chirpId":"11","user":{"screenName":"NilaMilliron_tw","lang":"en","friendsCount":445,"statusesCount":164,"name":"Nila
 
Milliron","followersCount":22649},"senderLocation":st_make_point(37.59,68.42),"sendTime":datetime("2008-03-09T10:10:00"),"referredTopics":{{"x-phone","platform"}},"messageText":"
 can't stand x-phone its platform is terrible"},
+        
{"chirpId":"12","user":{"screenName":"OliJackson_512","lang":"en","friendsCount":445,"statusesCount":164,"name":"Oli
 
Jackson","followersCount":22649},"senderLocation":st_make_point(24.82,94.63),"sendTime":datetime("2010-02-13T10:10:00"),"referredTopics":{{"product-y","voice-command"}},"messageText":"
 like product-y the voice-command is amazing:)"}
         ]);
 
 [Gleambook Users](../data/gbu.adm)
@@ -308,27 +310,27 @@ of the data instances will be stored separately from 
their associated field name
         
{"id":10,"alias":"Bram","name":"BramHatch","userSince":datetime("2010-10-16T10:10:00"),"friendIds":{{1,5,9}},"employment":[{"organizationName":"physcane","startDate":date("2007-06-05"),"endDate":date("2011-11-05")}]}
         ]);
 
-[Gleambook Messages](../data/gbm.adm)
+[Gleambook Messages](   ../data/gbm.adm)
 
         USE TinySocial;
 
         INSERT INTO GleambookMessages
         ([
-        
{"messageId":1,"authorId":3,"inResponseTo":2,"senderLocation":point("47.16,77.75"),"message":"
 love product-b its shortcut-menu is awesome:)"},
-        
{"messageId":2,"authorId":1,"inResponseTo":4,"senderLocation":point("41.66,80.87"),"message":"
 dislike x-phone its touch-screen is horrible"},
-        
{"messageId":3,"authorId":2,"inResponseTo":4,"senderLocation":point("48.09,81.01"),"message":"
 like product-y the plan is amazing"},
-        
{"messageId":4,"authorId":1,"inResponseTo":2,"senderLocation":point("37.73,97.04"),"message":"
 can't stand acast the network is horrible:("},
-        
{"messageId":5,"authorId":6,"inResponseTo":2,"senderLocation":point("34.7,90.76"),"message":"
 love product-b the customization is mind-blowing"},
-        
{"messageId":6,"authorId":2,"inResponseTo":1,"senderLocation":point("31.5,75.56"),"message":"
 like product-z its platform is mind-blowing"},
-        
{"messageId":7,"authorId":5,"inResponseTo":15,"senderLocation":point("32.91,85.05"),"message":"
 dislike product-b the speed is horrible"},
-        
{"messageId":8,"authorId":1,"inResponseTo":11,"senderLocation":point("40.33,80.87"),"message":"
 like ccast the 3G is awesome:)"},
-        
{"messageId":9,"authorId":3,"inResponseTo":12,"senderLocation":point("34.45,96.48"),"message":"
 love ccast its wireless is good"},
-        
{"messageId":10,"authorId":1,"inResponseTo":12,"senderLocation":point("42.5,70.01"),"message":"
 can't stand product-w the touch-screen is terrible"},
-        
{"messageId":11,"authorId":1,"inResponseTo":1,"senderLocation":point("38.97,77.49"),"message":"
 can't stand acast its plan is terrible"},
-        
{"messageId":12,"authorId":10,"inResponseTo":6,"senderLocation":point("42.26,77.76"),"message":"
 can't stand product-z its voicemail-service is OMG:("},
-        
{"messageId":13,"authorId":10,"inResponseTo":4,"senderLocation":point("42.77,78.92"),"message":"
 dislike x-phone the voice-command is bad:("},
-        
{"messageId":14,"authorId":9,"inResponseTo":12,"senderLocation":point("41.33,85.28"),"message":"
 love acast its 3G is good:)"},
-        
{"messageId":15,"authorId":7,"inResponseTo":11,"senderLocation":point("44.47,67.11"),"message":"
 like x-phone the voicemail-service is awesome"}
+        
{"messageId":1,"authorId":3,"inResponseTo":2,"senderLocation":st_make_point(47.16,77.75),"message":"
 love product-b its shortcut-menu is awesome:)"},
+        
{"messageId":2,"authorId":1,"inResponseTo":4,"senderLocation":st_make_point(41.66,80.87),"message":"
 dislike x-phone its touch-screen is horrible"},
+        
{"messageId":3,"authorId":2,"inResponseTo":4,"senderLocation":st_make_point(48.09,81.01),"message":"
 like product-y the plan is amazing"},
+        
{"messageId":4,"authorId":1,"inResponseTo":2,"senderLocation":st_make_point(37.73,97.04),"message":"
 can't stand acast the network is horrible:("},
+        
{"messageId":5,"authorId":6,"inResponseTo":2,"senderLocation":st_make_point(34.7,90.76),"message":"
 love product-b the customization is mind-blowing"},
+        
{"messageId":6,"authorId":2,"inResponseTo":1,"senderLocation":st_make_point(31.5,75.56),"message":"
 like product-z its platform is mind-blowing"},
+        
{"messageId":7,"authorId":5,"inResponseTo":15,"senderLocation":st_make_point(32.91,85.05),"message":"
 dislike product-b the speed is horrible"},
+        
{"messageId":8,"authorId":1,"inResponseTo":11,"senderLocation":st_make_point(40.33,80.87),"message":"
 like ccast the 3G is awesome:)"},
+        
{"messageId":9,"authorId":3,"inResponseTo":12,"senderLocation":st_make_point(34.45,96.48),"message":"
 love ccast its wireless is good"},
+        
{"messageId":10,"authorId":1,"inResponseTo":12,"senderLocation":st_make_point(42.5,70.01),"message":"
 can't stand product-w the touch-screen is terrible"},
+        
{"messageId":11,"authorId":1,"inResponseTo":1,"senderLocation":st_make_point(38.97,77.49),"message":"
 can't stand acast its plan is terrible"},
+        
{"messageId":12,"authorId":10,"inResponseTo":6,"senderLocation":st_make_point(42.26,77.76),"message":"
 can't stand product-z its voicemail-service is OMG:("},
+        
{"messageId":13,"authorId":10,"inResponseTo":4,"senderLocation":st_make_point(42.77,78.92),"message":"
 dislike x-phone the voice-command is bad:("},
+        
{"messageId":14,"authorId":9,"inResponseTo":12,"senderLocation":st_make_point(41.33,85.28),"message":"
 love acast its 3G is good:)"},
+        
{"messageId":15,"authorId":7,"inResponseTo":11,"senderLocation":st_make_point(44.47,67.11),"message":"
 like x-phone the voicemail-service is awesome"}
         ]);
 
 
@@ -385,7 +387,7 @@ Since this dataset is indexed on user id (its primary key), 
this query will be d
 
 The expected result for our sample data is as follows:
 
-        { "id": 8, "alias": "Nila", "name": "NilaMilliron", "userSince": 
datetime("2008-01-01T10:10:00.000Z"), "friendIds": {{ 3 }}, "employment": [ { 
"organizationName": "Plexlane", "startDate": date("2010-02-28") } ] }
+        { "id": 8, "alias": "Nila", "name": "NilaMilliron", "userSince": 
"2008-01-01T10:10:00.000", "friendIds": [ 3 ], "employment": [ { 
"organizationName": "Plexlane", "startDate": "2010-02-28" } ] }
 
 
 ### Query 0-B - Range Scan ###
@@ -400,9 +402,9 @@ For example, for our next query, let's find the Gleambook 
users whose ids are in
 
 This query's expected result, also evaluable using the primary index on user 
id, is:
 
-        { "id": 2, "alias": "Isbel", "name": "IsbelDull", "userSince": 
datetime("2011-01-22T10:10:00.000Z"), "friendIds": {{ 1, 4 }}, "employment": [ 
{ "organizationName": "Hexviafind", "startDate": date("2010-04-27") } ], 
"nickname": "Izzy" }
-        { "id": 3, "alias": "Emory", "name": "EmoryUnk", "userSince": 
datetime("2012-07-10T10:10:00.000Z"), "friendIds": {{ 1, 5, 8, 9 }}, 
"employment": [ { "organizationName": "geomedia", "startDate": 
date("2010-06-17"), "endDate": date("2010-01-26") } ] }
-        { "id": 4, "alias": "Nicholas", "name": "NicholasStroh", "userSince": 
datetime("2010-12-27T10:10:00.000Z"), "friendIds": {{ 2 }}, "employment": [ { 
"organizationName": "Zamcorporation", "startDate": date("2010-06-08") } ] }
+        { "id": 2, "alias": "Isbel", "name": "IsbelDull", "userSince": 
"2011-01-22T10:10:00.000", "friendIds": [ 1, 4 ], "employment": [ { 
"organizationName": "Hexviafind", "startDate": "2010-04-27" } ], "nickname": 
"Izzy" }
+        { "id": 3, "alias": "Emory", "name": "EmoryUnk", "userSince": 
"2012-07-10T10:10:00.000", "friendIds": [ 1, 5, 8, 9 ], "employment": [ { 
"organizationName": "geomedia", "startDate": "2010-06-17", "endDate": 
"2010-01-26" } ] }
+        { "id": 4, "alias": "Nicholas", "name": "NicholasStroh", "userSince": 
"2010-12-27T10:10:00.000", "friendIds": [ 2 ], "employment": [ { 
"organizationName": "Zamcorporation", "startDate": "2010-06-08" } ] }
 
 ### Query 1 - Other Query Filters ###
 SQL++ can do range queries on any data type that supports the appropriate set 
of comparators.
@@ -417,10 +419,10 @@ As an example, this next query retrieves the Gleambook 
users who joined between
 
 The expected result for this query, also an indexable query, is as follows:
 
-        { "id": 10, "alias": "Bram", "name": "BramHatch", "userSince": 
datetime("2010-10-16T10:10:00.000Z"), "friendIds": {{ 1, 5, 9 }}, "employment": 
[ { "organizationName": "physcane", "startDate": date("2007-06-05"), "endDate": 
date("2011-11-05") } ] }
-        { "id": 2, "alias": "Isbel", "name": "IsbelDull", "userSince": 
datetime("2011-01-22T10:10:00.000Z"), "friendIds": {{ 1, 4 }}, "employment": [ 
{ "organizationName": "Hexviafind", "startDate": date("2010-04-27") } ], 
"nickname": "Izzy" }
-        { "id": 3, "alias": "Emory", "name": "EmoryUnk", "userSince": 
datetime("2012-07-10T10:10:00.000Z"), "friendIds": {{ 1, 5, 8, 9 }}, 
"employment": [ { "organizationName": "geomedia", "startDate": 
date("2010-06-17"), "endDate": date("2010-01-26") } ] }
-        { "id": 4, "alias": "Nicholas", "name": "NicholasStroh", "userSince": 
datetime("2010-12-27T10:10:00.000Z"), "friendIds": {{ 2 }}, "employment": [ { 
"organizationName": "Zamcorporation", "startDate": date("2010-06-08") } ] }
+        { "id": 10, "alias": "Bram", "name": "BramHatch", "userSince": 
"2010-10-16T10:10:00.000", "friendIds": [ 1, 5, 9 ], "employment": [ { 
"organizationName": "physcane", "startDate": "2007-06-05", "endDate": 
"2011-11-05" } ] }
+        { "id": 2, "alias": "Isbel", "name": "IsbelDull", "userSince": 
"2011-01-22T10:10:00.000", "friendIds": [ 1, 4 ], "employment": [ { 
"organizationName": "Hexviafind", "startDate": "2010-04-27" } ], "nickname": 
"Izzy" }
+        { "id": 3, "alias": "Emory", "name": "EmoryUnk", "userSince": 
"2012-07-10T10:10:00.000", "friendIds": [ 1, 5, 8, 9 ], "employment": [ { 
"organizationName": "geomedia", "startDate": "2010-06-17", "endDate": 
"2010-01-26" } ] }
+        { "id": 4, "alias": "Nicholas", "name": "NicholasStroh", "userSince": 
"2010-12-27T10:10:00.000", "friendIds": [ 2 ], "employment": [ { 
"organizationName": "Zamcorporation", "startDate": "2010-06-08" } ] }
 
 ### Query 2-A - Equijoin ###
 In addition to simply binding variables to data instances and returning them 
"whole",
@@ -476,21 +478,21 @@ as SQL was not designed to handle the richer, nested data 
model that underlies t
 
 The expected result of this version of the SQL++ join query for our sample 
data set is:
 
-        { "user": { "id": 6, "alias": "Willis", "name": "WillisWynne", 
"userSince": datetime("2005-01-17T10:10:00.000Z"), "friendIds": {{ 1, 3, 7 }}, 
"employment": [ { "organizationName": "jaydax", "startDate": date("2009-05-15") 
} ] }, "msg": { "messageId": 5, "authorId": 6, "inResponseTo": 2, 
"senderLocation": point("34.7,90.76"), "message": " love product-b the 
customization is mind-blowing" } }
-        { "user": { "id": 9, "alias": "Woodrow", "name": "WoodrowNehling", 
"userSince": datetime("2005-09-20T10:10:00.000Z"), "friendIds": {{ 3, 10 }}, 
"employment": [ { "organizationName": "Zuncan", "startDate": 
date("2003-04-22"), "endDate": date("2009-12-13") } ], "nickname": "Woody" }, 
"msg": { "messageId": 14, "authorId": 9, "inResponseTo": 12, "senderLocation": 
point("41.33,85.28"), "message": " love acast its 3G is good:)" } }
-        { "user": { "id": 10, "alias": "Bram", "name": "BramHatch", 
"userSince": datetime("2010-10-16T10:10:00.000Z"), "friendIds": {{ 1, 5, 9 }}, 
"employment": [ { "organizationName": "physcane", "startDate": 
date("2007-06-05"), "endDate": date("2011-11-05") } ] }, "msg": { "messageId": 
12, "authorId": 10, "inResponseTo": 6, "senderLocation": point("42.26,77.76"), 
"message": " can't stand product-z its voicemail-service is OMG:(" } }
-        { "user": { "id": 10, "alias": "Bram", "name": "BramHatch", 
"userSince": datetime("2010-10-16T10:10:00.000Z"), "friendIds": {{ 1, 5, 9 }}, 
"employment": [ { "organizationName": "physcane", "startDate": 
date("2007-06-05"), "endDate": date("2011-11-05") } ] }, "msg": { "messageId": 
13, "authorId": 10, "inResponseTo": 4, "senderLocation": point("42.77,78.92"), 
"message": " dislike x-phone the voice-command is bad:(" } }
-        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": datetime("2012-08-20T10:10:00.000Z"), 
"friendIds": {{ 2, 3, 6, 10 }}, "employment": [ { "organizationName": 
"Codetechno", "startDate": date("2006-08-06") }, { "organizationName": 
"geomedia", "startDate": date("2010-06-17"), "endDate": date("2010-01-26") } ], 
"nickname": "Mags", "gender": "F" }, "msg": { "messageId": 8, "authorId": 1, 
"inResponseTo": 11, "senderLocation": point("40.33,80.87"), "me [...]
-        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": datetime("2012-08-20T10:10:00.000Z"), 
"friendIds": {{ 2, 3, 6, 10 }}, "employment": [ { "organizationName": 
"Codetechno", "startDate": date("2006-08-06") }, { "organizationName": 
"geomedia", "startDate": date("2010-06-17"), "endDate": date("2010-01-26") } ], 
"nickname": "Mags", "gender": "F" }, "msg": { "messageId": 10, "authorId": 1, 
"inResponseTo": 12, "senderLocation": point("42.5,70.01"), "me [...]
-        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": datetime("2012-08-20T10:10:00.000Z"), 
"friendIds": {{ 2, 3, 6, 10 }}, "employment": [ { "organizationName": 
"Codetechno", "startDate": date("2006-08-06") }, { "organizationName": 
"geomedia", "startDate": date("2010-06-17"), "endDate": date("2010-01-26") } ], 
"nickname": "Mags", "gender": "F" }, "msg": { "messageId": 11, "authorId": 1, 
"inResponseTo": 1, "senderLocation": point("38.97,77.49"), "me [...]
-        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": datetime("2012-08-20T10:10:00.000Z"), 
"friendIds": {{ 2, 3, 6, 10 }}, "employment": [ { "organizationName": 
"Codetechno", "startDate": date("2006-08-06") }, { "organizationName": 
"geomedia", "startDate": date("2010-06-17"), "endDate": date("2010-01-26") } ], 
"nickname": "Mags", "gender": "F" }, "msg": { "messageId": 2, "authorId": 1, 
"inResponseTo": 4, "senderLocation": point("41.66,80.87"), "mes [...]
-        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": datetime("2012-08-20T10:10:00.000Z"), 
"friendIds": {{ 2, 3, 6, 10 }}, "employment": [ { "organizationName": 
"Codetechno", "startDate": date("2006-08-06") }, { "organizationName": 
"geomedia", "startDate": date("2010-06-17"), "endDate": date("2010-01-26") } ], 
"nickname": "Mags", "gender": "F" }, "msg": { "messageId": 4, "authorId": 1, 
"inResponseTo": 2, "senderLocation": point("37.73,97.04"), "mes [...]
-        { "user": { "id": 2, "alias": "Isbel", "name": "IsbelDull", 
"userSince": datetime("2011-01-22T10:10:00.000Z"), "friendIds": {{ 1, 4 }}, 
"employment": [ { "organizationName": "Hexviafind", "startDate": 
date("2010-04-27") } ], "nickname": "Izzy" }, "msg": { "messageId": 6, 
"authorId": 2, "inResponseTo": 1, "senderLocation": point("31.5,75.56"), 
"message": " like product-z its platform is mind-blowing" } }
-        { "user": { "id": 2, "alias": "Isbel", "name": "IsbelDull", 
"userSince": datetime("2011-01-22T10:10:00.000Z"), "friendIds": {{ 1, 4 }}, 
"employment": [ { "organizationName": "Hexviafind", "startDate": 
date("2010-04-27") } ], "nickname": "Izzy" }, "msg": { "messageId": 3, 
"authorId": 2, "inResponseTo": 4, "senderLocation": point("48.09,81.01"), 
"message": " like product-y the plan is amazing" } }
-        { "user": { "id": 3, "alias": "Emory", "name": "EmoryUnk", 
"userSince": datetime("2012-07-10T10:10:00.000Z"), "friendIds": {{ 1, 5, 8, 9 
}}, "employment": [ { "organizationName": "geomedia", "startDate": 
date("2010-06-17"), "endDate": date("2010-01-26") } ] }, "msg": { "messageId": 
9, "authorId": 3, "inResponseTo": 12, "senderLocation": point("34.45,96.48"), 
"message": " love ccast its wireless is good" } }
-        { "user": { "id": 3, "alias": "Emory", "name": "EmoryUnk", 
"userSince": datetime("2012-07-10T10:10:00.000Z"), "friendIds": {{ 1, 5, 8, 9 
}}, "employment": [ { "organizationName": "geomedia", "startDate": 
date("2010-06-17"), "endDate": date("2010-01-26") } ] }, "msg": { "messageId": 
1, "authorId": 3, "inResponseTo": 2, "senderLocation": point("47.16,77.75"), 
"message": " love product-b its shortcut-menu is awesome:)" } }
-        { "user": { "id": 5, "alias": "Von", "name": "VonKemble", "userSince": 
datetime("2010-01-05T10:10:00.000Z"), "friendIds": {{ 3, 6, 10 }}, 
"employment": [ { "organizationName": "Kongreen", "startDate": 
date("2010-11-27") } ] }, "msg": { "messageId": 7, "authorId": 5, 
"inResponseTo": 15, "senderLocation": point("32.91,85.05"), "message": " 
dislike product-b the speed is horrible" } }
-        { "user": { "id": 7, "alias": "Suzanna", "name": "SuzannaTillson", 
"userSince": datetime("2012-08-07T10:10:00.000Z"), "friendIds": {{ 6 }}, 
"employment": [ { "organizationName": "Labzatron", "startDate": 
date("2011-04-19") } ] }, "msg": { "messageId": 15, "authorId": 7, 
"inResponseTo": 11, "senderLocation": point("44.47,67.11"), "message": " like 
x-phone the voicemail-service is awesome" } }
+        { "user": { "id": 6, "alias": "Willis", "name": "WillisWynne", 
"userSince": "2005-01-17T10:10:00.000", "friendIds": [ 1, 3, 7 ], "employment": 
[ { "organizationName": "jaydax", "startDate": "2009-05-15" } ] }, "msg": { 
"messageId": 5, "authorId": 6, "inResponseTo": 2, "senderLocation": { “type”: 
“Point”, “coordinates”:[34.7,90.76] }, "message": " love product-b the 
customization is mind-blowing" } }
+        { "user": { "id": 9, "alias": "Woodrow", "name": "WoodrowNehling", 
"userSince": "2005-09-20T10:10:00.000", "friendIds": [ 3, 10 ], "employment": [ 
{ "organizationName": "Zuncan", "startDate": "2003-04-22", "endDate": 
"2009-12-13" } ], "nickname": "Woody" }, "msg": { "messageId": 14, "authorId": 
9, "inResponseTo": 12, "senderLocation": { “type”: “Point”, 
“coordinates”:[41.33,85.28] }, "message": " love acast its 3G is good:)" } }
+        { "user": { "id": 10, "alias": "Bram", "name": "BramHatch", 
"userSince": "2010-10-16T10:10:00.000", "friendIds": [ 1, 5, 9 ], "employment": 
[ { "organizationName": "physcane", "startDate": "2007-06-05", "endDate": 
"2011-11-05" } ] }, "msg": { "messageId": 12, "authorId": 10, "inResponseTo": 
6, "senderLocation": { “type”: “Point”, “coordinates”:[42.26,77.76] }, 
"message": " can't stand product-z its voicemail-service is OMG:(" } }
+        { "user": { "id": 10, "alias": "Bram", "name": "BramHatch", 
"userSince": "2010-10-16T10:10:00.000", "friendIds": [ 1, 5, 9 ], "employment": 
[ { "organizationName": "physcane", "startDate": "2007-06-05", "endDate": 
"2011-11-05" } ] }, "msg": { "messageId": 13, "authorId": 10, "inResponseTo": 
4, "senderLocation": { “type”: “Point”, “coordinates”:[42.77,78.92] }, 
"message": " dislike x-phone the voice-command is bad:(" } }
+        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": "2012-08-20T10:10:00.000", "friendIds": [ 2, 
3, 6, 10 ], "employment": [ { "organizationName": "Codetechno", "startDate": 
"2006-08-06" }, { "organizationName": "geomedia", "startDate": "2010-06-17", 
"endDate": "2010-01-26" } ], "nickname": "Mags", "gender": "F" }, "msg": { 
"messageId": 8, "authorId": 1, "inResponseTo": 11, "senderLocation": { “type”: 
“Point”, “coordinates”:[40.33,80.87] }, "messa [...]
+        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": "2012-08-20T10:10:00.000", "friendIds": [ 2, 
3, 6, 10 ], "employment": [ { "organizationName": "Codetechno", "startDate": 
"2006-08-06" }, { "organizationName": "geomedia", "startDate": "2010-06-17", 
"endDate": "2010-01-26" } ], "nickname": "Mags", "gender": "F" }, "msg": { 
"messageId": 10, "authorId": 1, "inResponseTo": 12, "senderLocation": { “type”: 
“Point”, “coordinates”:[42.5,70.01] }, "messa [...]
+        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": "2012-08-20T10:10:00.000", "friendIds": [ 2, 
3, 6, 10 ], "employment": [ { "organizationName": "Codetechno", "startDate": 
"2006-08-06" }, { "organizationName": "geomedia", "startDate": "2010-06-17", 
"endDate": "2010-01-26" } ], "nickname": "Mags", "gender": "F" }, "msg": { 
"messageId": 11, "authorId": 1, "inResponseTo": 1, "senderLocation": { “type”: 
“Point”, “coordinates”:[38.97,77.49] }, "messa [...]
+        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": "2012-08-20T10:10:00.000", "friendIds": [ 2, 
3, 6, 10 ], "employment": [ { "organizationName": "Codetechno", "startDate": 
"2006-08-06" }, { "organizationName": "geomedia", "startDate": "2010-06-17", 
"endDate": "2010-01-26" } ], "nickname": "Mags", "gender": "F" }, "msg": { 
"messageId": 2, "authorId": 1, "inResponseTo": 4, "senderLocation": { “type”: 
“Point”, “coordinates”:[41.66,80.87] }, "messag [...]
+        { "user": { "id": 1, "alias": "Margarita", "name": 
"MargaritaStoddard", "userSince": "2012-08-20T10:10:00.000", "friendIds": [ 2, 
3, 6, 10 ], "employment": [ { "organizationName": "Codetechno", "startDate": 
"2006-08-06" }, { "organizationName": "geomedia", "startDate": "2010-06-17", 
"endDate": "2010-01-26" } ], "nickname": "Mags", "gender": "F" }, "msg": { 
"messageId": 4, "authorId": 1, "inResponseTo": 2, "senderLocation": { “type”: 
“Point”, “coordinates”:[37.73,97.04] }, "messag [...]
+        { "user": { "id": 2, "alias": "Isbel", "name": "IsbelDull", 
"userSince": "2011-01-22T10:10:00.000", "friendIds": [ 1, 4 ], "employment": [ 
{ "organizationName": "Hexviafind", "startDate": "2010-04-27" } ], "nickname": 
"Izzy" }, "msg": { "messageId": 6, "authorId": 2, "inResponseTo": 1, 
"senderLocation": { “type”: “Point”, “coordinates”:[31.5,75.56] }, "message": " 
like product-z its platform is mind-blowing" } }
+        { "user": { "id": 2, "alias": "Isbel", "name": "IsbelDull", 
"userSince": "2011-01-22T10:10:00.000", "friendIds": [ 1, 4 ], "employment": [ 
{ "organizationName": "Hexviafind", "startDate": "2010-04-27" } ], "nickname": 
"Izzy" }, "msg": { "messageId": 3, "authorId": 2, "inResponseTo": 4, 
"senderLocation": { “type”: “Point”, “coordinates”:[48.09,81.01] }, "message": 
" like product-y the plan is amazing" } }
+        { "user": { "id": 3, "alias": "Emory", "name": "EmoryUnk", 
"userSince": "2012-07-10T10:10:00.000", "friendIds": [ 1, 5, 8, 9 ], 
"employment": [ { "organizationName": "geomedia", "startDate": "2010-06-17", 
"endDate": "2010-01-26" } ] }, "msg": { "messageId": 9, "authorId": 3, 
"inResponseTo": 12, "senderLocation": { “type”: “Point”, 
“coordinates”:[34.45,96.48] }, "message": " love ccast its wireless is good" } }
+        { "user": { "id": 3, "alias": "Emory", "name": "EmoryUnk", 
"userSince": "2012-07-10T10:10:00.000", "friendIds": [ 1, 5, 8, 9 ], 
"employment": [ { "organizationName": "geomedia", "startDate": "2010-06-17", 
"endDate": "2010-01-26" } ] }, "msg": { "messageId": 1, "authorId": 3, 
"inResponseTo": 2, "senderLocation": { “type”: “Point”, 
“coordinates”:[47.16,77.75] }, "message": " love product-b its shortcut-menu is 
awesome:)" } }
+        { "user": { "id": 5, "alias": "Von", "name": "VonKemble", "userSince": 
"2010-01-05T10:10:00.000", "friendIds": [ 3, 6, 10 ], "employment": [ { 
"organizationName": "Kongreen", "startDate": "2010-11-27" } ] }, "msg": { 
"messageId": 7, "authorId": 5, "inResponseTo": 15, "senderLocation": { “type”: 
“Point”, “coordinates”:[32.91,85.05] }, "message": " dislike product-b the 
speed is horrible" } }
+        { "user": { "id": 7, "alias": "Suzanna", "name": "SuzannaTillson", 
"userSince": "2012-08-07T10:10:00.000", "friendIds": [ 6 ], "employment": [ { 
"organizationName": "Labzatron", "startDate": "2011-04-19" } ] }, "msg": { 
"messageId": 15, "authorId": 7, "inResponseTo": 11, "senderLocation": { “type”: 
“Point”, “coordinates”:[44.47,67.11] }, "message": " like x-phone the 
voicemail-service is awesome" } }
 
 Finally (for now :-)), another less lazy and more explicit SQL++ way of 
achieving the result shown above is:
 
@@ -613,7 +615,7 @@ functions on the spatial data type instead of id equality 
in the correlated quer
         SELECT cm1.messageText AS message,
                (SELECT VALUE cm2.messageText
                 FROM ChirpMessages cm2
-                WHERE `spatial-distance`(cm1.senderLocation, 
cm2.senderLocation) <= 1
+                WHERE st_distance(cm1.senderLocation, cm2.senderLocation) <= 1
                   AND cm2.chirpId < cm1.chirpId) AS nearbyMessages
         FROM ChirpMessages cm1;
 
@@ -680,13 +682,13 @@ This leads us to the following SQL++ query:
 
 The expected result in this case is:
 
-        { "id": 6, "alias": "Willis", "name": "WillisWynne", "userSince": 
datetime("2005-01-17T10:10:00.000Z"), "friendIds": {{ 1, 3, 7 }}, "employment": 
[ { "organizationName": "jaydax", "startDate": date("2009-05-15") } ] }
-        { "id": 8, "alias": "Nila", "name": "NilaMilliron", "userSince": 
datetime("2008-01-01T10:10:00.000Z"), "friendIds": {{ 3 }}, "employment": [ { 
"organizationName": "Plexlane", "startDate": date("2010-02-28") } ] }
-        { "id": 1, "alias": "Margarita", "name": "MargaritaStoddard", 
"userSince": datetime("2012-08-20T10:10:00.000Z"), "friendIds": {{ 2, 3, 6, 10 
}}, "employment": [ { "organizationName": "Codetechno", "startDate": 
date("2006-08-06") }, { "organizationName": "geomedia", "startDate": 
date("2010-06-17"), "endDate": date("2010-01-26") } ], "nickname": "Mags", 
"gender": "F" }
-        { "id": 2, "alias": "Isbel", "name": "IsbelDull", "userSince": 
datetime("2011-01-22T10:10:00.000Z"), "friendIds": {{ 1, 4 }}, "employment": [ 
{ "organizationName": "Hexviafind", "startDate": date("2010-04-27") } ], 
"nickname": "Izzy" }
-        { "id": 4, "alias": "Nicholas", "name": "NicholasStroh", "userSince": 
datetime("2010-12-27T10:10:00.000Z"), "friendIds": {{ 2 }}, "employment": [ { 
"organizationName": "Zamcorporation", "startDate": date("2010-06-08") } ] }
-        { "id": 5, "alias": "Von", "name": "VonKemble", "userSince": 
datetime("2010-01-05T10:10:00.000Z"), "friendIds": {{ 3, 6, 10 }}, 
"employment": [ { "organizationName": "Kongreen", "startDate": 
date("2010-11-27") } ] }
-        { "id": 7, "alias": "Suzanna", "name": "SuzannaTillson", "userSince": 
datetime("2012-08-07T10:10:00.000Z"), "friendIds": {{ 6 }}, "employment": [ { 
"organizationName": "Labzatron", "startDate": date("2011-04-19") } ] }
+        { "id": 6, "alias": "Willis", "name": "WillisWynne", "userSince": 
"2005-01-17T10:10:00.000", "friendIds": [ 1, 3, 7 ], "employment": [ { 
"organizationName": "jaydax", "startDate": "2009-05-15" } ] }
+        { "id": 8, "alias": "Nila", "name": "NilaMilliron", "userSince": 
"2008-01-01T10:10:00.000", "friendIds": [ 3 ], "employment": [ { 
"organizationName": "Plexlane", "startDate": "2010-02-28" } ] }
+        { "id": 1, "alias": "Margarita", "name": "MargaritaStoddard", 
"userSince": "2012-08-20T10:10:00.000", "friendIds": [ 2, 3, 6, 10 ], 
"employment": [ { "organizationName": "Codetechno", "startDate": "2006-08-06" 
}, { "organizationName": "geomedia", "startDate": "2010-06-17", "endDate": 
"2010-01-26" } ], "nickname": "Mags", "gender": "F" }
+        { "id": 2, "alias": "Isbel", "name": "IsbelDull", "userSince": 
"2011-01-22T10:10:00.000", "friendIds": [ 1, 4 ], "employment": [ { 
"organizationName": "Hexviafind", "startDate": "2010-04-27" } ], "nickname": 
"Izzy" }
+        { "id": 4, "alias": "Nicholas", "name": "NicholasStroh", "userSince": 
"2010-12-27T10:10:00.000", "friendIds": [ 2 ], "employment": [ { 
"organizationName": "Zamcorporation", "startDate": "2010-06-08" } ] }
+        { "id": 5, "alias": "Von", "name": "VonKemble", "userSince": 
"2010-01-05T10:10:00.000", "friendIds": [ 3, 6, 10 ], "employment": [ { 
"organizationName": "Kongreen", "startDate": "2010-11-27" } ] }
+        { "id": 7, "alias": "Suzanna", "name": "SuzannaTillson", "userSince": 
"2012-08-07T10:10:00.000", "friendIds": [ 6 ], "employment": [ { 
"organizationName": "Labzatron", "startDate": "2011-04-19" } ] }
 
 ### Query 7 - Universal Quantification ###
 As an example of a universal SQL++ query, here we show a query to list the 
Gleambook users who are currently unemployed.
@@ -701,9 +703,9 @@ following SQL++ query:
 
 Here is the expected result for our sample data:
 
-        { "id": 9, "alias": "Woodrow", "name": "WoodrowNehling", "userSince": 
datetime("2005-09-20T10:10:00.000Z"), "friendIds": {{ 3, 10 }}, "employment": [ 
{ "organizationName": "Zuncan", "startDate": date("2003-04-22"), "endDate": 
date("2009-12-13") } ], "nickname": "Woody" }
-        { "id": 10, "alias": "Bram", "name": "BramHatch", "userSince": 
datetime("2010-10-16T10:10:00.000Z"), "friendIds": {{ 1, 5, 9 }}, "employment": 
[ { "organizationName": "physcane", "startDate": date("2007-06-05"), "endDate": 
date("2011-11-05") } ] }
-        { "id": 3, "alias": "Emory", "name": "EmoryUnk", "userSince": 
datetime("2012-07-10T10:10:00.000Z"), "friendIds": {{ 1, 5, 8, 9 }}, 
"employment": [ { "organizationName": "geomedia", "startDate": 
date("2010-06-17"), "endDate": date("2010-01-26") } ] }
+        { "id": 9, "alias": "Woodrow", "name": "WoodrowNehling", "userSince": 
"2005-09-20T10:10:00.000", "friendIds": [ 3, 10 ], "employment": [ { 
"organizationName": "Zuncan", "startDate": "2003-04-22", "endDate": 
"2009-12-13" } ], "nickname": "Woody" }
+        { "id": 10, "alias": "Bram", "name": "BramHatch", "userSince": 
"2010-10-16T10:10:00.000", "friendIds": [ 1, 5, 9 ], "employment": [ { 
"organizationName": "physcane", "startDate": "2007-06-05", "endDate": 
"2011-11-05" } ] }
+        { "id": 3, "alias": "Emory", "name": "EmoryUnk", "userSince": 
"2012-07-10T10:10:00.000", "friendIds": [ 1, 5, 8, 9 ], "employment": [ { 
"organizationName": "geomedia", "startDate": "2010-06-17", "endDate": 
"2010-01-26" } ] }
 
 ### Query 8 - Simple Aggregation ###
 Like SQL, the SQL++ language of AsterixDB provides support for computing 
aggregates over large amounts of data.
@@ -837,18 +839,18 @@ be used for the query's similarity operator and that a 
similarity index of 0.3 b
 
 The expected result for this fuzzy join query is:
 
-        { "chirp": { "chirpId": "11", "user": { "screenName": 
"NilaMilliron_tw", "lang": "en", "friendsCount": 445, "statusesCount": 164, 
"name": "Nila Milliron", "followersCount": 22649 }, "senderLocation": 
point("37.59,68.42"), "sendTime": datetime("2008-03-09T10:10:00.000Z"), 
"referredTopics": {{ "x-phone", "platform" }}, "messageText": " can't stand 
x-phone its platform is terrible" }, "similarChirps": [ "6", "7" ] }
-        { "chirp": { "chirpId": "2", "user": { "screenName": "ColineGeyer@63", 
"lang": "en", "friendsCount": 121, "statusesCount": 362, "name": "Coline 
Geyer", "followersCount": 17159 }, "senderLocation": point("32.84,67.14"), 
"sendTime": datetime("2010-05-13T10:10:00.000Z"), "referredTopics": {{ "ccast", 
"shortcut-menu" }}, "messageText": " like ccast its shortcut-menu is awesome:)" 
}, "similarChirps": [ "9", "8" ] }
-        { "chirp": { "chirpId": "3", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": 
point("29.72,75.8"), "sendTime": datetime("2006-11-04T10:10:00.000Z"), 
"referredTopics": {{ "product-w", "speed" }}, "messageText": " like product-w 
the speed is good:)" }, "similarChirps": [ "5" ] }
-        { "chirp": { "chirpId": "4", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": 
point("39.28,70.48"), "sendTime": datetime("2011-12-26T10:10:00.000Z"), 
"referredTopics": {{ "product-b", "voice-command" }}, "messageText": " like 
product-b the voice-command is mind-blowing:)" }, "similarChirps": [  ] }
-        { "chirp": { "chirpId": "6", "user": { "screenName": "ColineGeyer@63", 
"lang": "en", "friendsCount": 121, "statusesCount": 362, "name": "Coline 
Geyer", "followersCount": 17159 }, "senderLocation": point("47.51,83.99"), 
"sendTime": datetime("2010-05-07T10:10:00.000Z"), "referredTopics": {{ 
"x-phone", "voice-clarity" }}, "messageText": " like x-phone the voice-clarity 
is good:)" }, "similarChirps": [  ] }
-        { "chirp": { "chirpId": "7", "user": { "screenName": "ChangEwing_573", 
"lang": "en", "friendsCount": 182, "statusesCount": 394, "name": "Chang Ewing", 
"followersCount": 32136 }, "senderLocation": point("36.21,72.6"), "sendTime": 
datetime("2011-08-25T10:10:00.000Z"), "referredTopics": {{ "product-y", 
"platform" }}, "messageText": " like product-y the platform is good" }, 
"similarChirps": [  ] }
-        { "chirp": { "chirpId": "9", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": 
point("36.86,74.62"), "sendTime": datetime("2012-07-21T10:10:00.000Z"), 
"referredTopics": {{ "ccast", "voicemail-service" }}, "messageText": " love 
ccast its voicemail-service is awesome" }, "similarChirps": [  ] }
-        { "chirp": { "chirpId": "1", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": 
point("47.44,80.65"), "sendTime": datetime("2008-04-26T10:10:00.000Z"), 
"referredTopics": {{ "product-z", "customization" }}, "messageText": " love 
product-z its customization is good:)" }, "similarChirps": [ "8" ] }
-        { "chirp": { "chirpId": "10", "user": { "screenName": 
"ColineGeyer@63", "lang": "en", "friendsCount": 121, "statusesCount": 362, 
"name": "Coline Geyer", "followersCount": 17159 }, "senderLocation": 
point("29.15,76.53"), "sendTime": datetime("2008-01-26T10:10:00.000Z"), 
"referredTopics": {{ "ccast", "voice-clarity" }}, "messageText": " hate ccast 
its voice-clarity is OMG:(" }, "similarChirps": [ "2", "6", "9" ] }
-        { "chirp": { "chirpId": "12", "user": { "screenName": 
"OliJackson_512", "lang": "en", "friendsCount": 445, "statusesCount": 164, 
"name": "Oli Jackson", "followersCount": 22649 }, "senderLocation": 
point("24.82,94.63"), "sendTime": datetime("2010-02-13T10:10:00.000Z"), 
"referredTopics": {{ "product-y", "voice-command" }}, "messageText": " like 
product-y the voice-command is amazing:)" }, "similarChirps": [ "4", "7" ] }
-        { "chirp": { "chirpId": "5", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": 
point("40.09,92.69"), "sendTime": datetime("2006-08-04T10:10:00.000Z"), 
"referredTopics": {{ "product-w", "speed" }}, "messageText": " can't stand 
product-w its speed is terrible:(" }, "similarChirps": [  ] }
-        { "chirp": { "chirpId": "8", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": 
point("46.05,93.34"), "sendTime": datetime("2005-10-14T10:10:00.000Z"), 
"referredTopics": {{ "product-z", "shortcut-menu" }}, "messageText": " like 
product-z the shortcut-menu is awesome:)" }, "similarChirps": [  ] }
+        { "chirp": { "chirpId": "11", "user": { "screenName": 
"NilaMilliron_tw", "lang": "en", "friendsCount": 445, "statusesCount": 164, 
"name": "Nila Milliron", "followersCount": 22649 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[37.59,68.42] }, "sendTime": "2008-03-09T10:10:00.000", 
"referredTopics": [ "x-phone", "platform" ], "messageText": " can't stand 
x-phone its platform is terrible" }, "similarChirps": [ "6", "7" ] }
+        { "chirp": { "chirpId": "2", "user": { "screenName": "ColineGeyer@63", 
"lang": "en", "friendsCount": 121, "statusesCount": 362, "name": "Coline 
Geyer", "followersCount": 17159 }, "senderLocation": { “type”: “Point”, 
“coordinates”:[32.84,67.14] }, "sendTime": "2010-05-13T10:10:00.000", 
"referredTopics": [ "ccast", "shortcut-menu" ], "messageText": " like ccast its 
shortcut-menu is awesome:)" }, "similarChirps": [ "9", "8" ] }
+        { "chirp": { "chirpId": "3", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[29.72,75.8] }, "sendTime": "2006-11-04T10:10:00.000", 
"referredTopics": [ "product-w", "speed" ], "messageText": " like product-w the 
speed is good:)" }, "similarChirps": [ "5" ] }
+        { "chirp": { "chirpId": "4", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[39.28,70.48] }, "sendTime": "2011-12-26T10:10:00.000", 
"referredTopics": [ "product-b", "voice-command" ], "messageText": " like 
product-b the voice-command is mind-blowing:)" }, "similarChirps": [  ] }
+        { "chirp": { "chirpId": "6", "user": { "screenName": "ColineGeyer@63", 
"lang": "en", "friendsCount": 121, "statusesCount": 362, "name": "Coline 
Geyer", "followersCount": 17159 }, "senderLocation": { “type”: “Point”, 
“coordinates”:[47.51,83.99] }, "sendTime": "2010-05-07T10:10:00.000", 
"referredTopics": [ "x-phone", "voice-clarity" ], "messageText": " like x-phone 
the voice-clarity is good:)" }, "similarChirps": [  ] }
+        { "chirp": { "chirpId": "7", "user": { "screenName": "ChangEwing_573", 
"lang": "en", "friendsCount": 182, "statusesCount": 394, "name": "Chang Ewing", 
"followersCount": 32136 }, "senderLocation": { “type”: “Point”, 
“coordinates”:[36.21,72.6] }, "sendTime": "2011-08-25T10:10:00.000", 
"referredTopics": [ "product-y", "platform" ], "messageText": " like product-y 
the platform is good" }, "similarChirps": [  ] }
+        { "chirp": { "chirpId": "9", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[36.86,74.62] }, "sendTime": "2012-07-21T10:10:00.000", 
"referredTopics": [ "ccast", "voicemail-service" ], "messageText": " love ccast 
its voicemail-service is awesome" }, "similarChirps": [  ] }
+        { "chirp": { "chirpId": "1", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[47.44,80.65] }, "sendTime": "2008-04-26T10:10:00.000", 
"referredTopics": [ "product-z", "customization" ], "messageText": " love 
product-z its customization is good:)" }, "similarChirps": [ "8" ] }
+        { "chirp": { "chirpId": "10", "user": { "screenName": 
"ColineGeyer@63", "lang": "en", "friendsCount": 121, "statusesCount": 362, 
"name": "Coline Geyer", "followersCount": 17159 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[29.15,76.53] }, "sendTime": "2008-01-26T10:10:00.000", 
"referredTopics": [ "ccast", "voice-clarity" ], "messageText": " hate ccast its 
voice-clarity is OMG:(" }, "similarChirps": [ "2", "6", "9" ] }
+        { "chirp": { "chirpId": "12", "user": { "screenName": 
"OliJackson_512", "lang": "en", "friendsCount": 445, "statusesCount": 164, 
"name": "Oli Jackson", "followersCount": 22649 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[24.82,94.63] }, "sendTime": "2010-02-13T10:10:00.000", 
"referredTopics": [ "product-y", "voice-command" ], "messageText": " like 
product-y the voice-command is amazing:)" }, "similarChirps": [ "4", "7" ] }
+        { "chirp": { "chirpId": "5", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[40.09,92.69] }, "sendTime": "2006-08-04T10:10:00.000", 
"referredTopics": [ "product-w", "speed" ], "messageText": " can't stand 
product-w its speed is terrible:(" }, "similarChirps": [  ] }
+        { "chirp": { "chirpId": "8", "user": { "screenName": 
"NathanGiesen@211", "lang": "en", "friendsCount": 39339, "statusesCount": 473, 
"name": "Nathan Giesen", "followersCount": 49416 }, "senderLocation": { “type”: 
“Point”, “coordinates”:[46.05,93.34] }, "sendTime": "2005-10-14T10:10:00.000", 
"referredTopics": [ "product-z", "shortcut-menu" ], "messageText": " like 
product-z the shortcut-menu is awesome:)" }, "similarChirps": [  ] }
 
 ## Inserting New Data  ###
 In addition to loading and querying data, AsterixDB supports incremental 
additions to datasets via the SQL++ _INSERT_ statement.
@@ -870,9 +872,9 @@ have all gone up in the interim, although he appears not to 
have moved in the la
                  "name": "Nathan Giesen",
                  "followersCount": 49420
                 },
-            "senderLocation": point("47.44,80.65"),
+            "senderLocation": st_make_point(47.44,80.65),
             "sendTime": datetime("2008-04-26T10:10:35"),
-            "referredTopics": {{"chirping"}},
+            "referredTopics": ["chirping"],
             "messageText": "chirpy chirp, my fellow chirpers!"
            }
         );
@@ -928,4 +930,4 @@ AsterixDB is powerful, so use it wisely, and remember: 
"With great power comes g
 
 Please e-mail the AsterixDB user group
 (users (at) asterixdb.apache.org)
-if you run into any problems or simply have further questions about the 
AsterixDB system, its features, or their proper use.
+if you run into any problems or simply have further questions about the 
AsterixDB system, its features, or their proper use.
\ No newline at end of file
diff --git a/asterixdb/asterix-doc/src/site/resources/data/chm.adm 
b/asterixdb/asterix-doc/src/site/resources/data/chm.adm
index da6ce31c1b..bb2a725e0d 100644
--- a/asterixdb/asterix-doc/src/site/resources/data/chm.adm
+++ b/asterixdb/asterix-doc/src/site/resources/data/chm.adm
@@ -1,12 +1,12 @@
-{"chirpId":"1","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("47.44,80.65"),"sendTime":datetime("2008-04-26T10:10:00"),"referredTopics":{{"product-z","customization"}},"messageText":"
 love product-z its customization is good:)"}
-{"chirpId":"2","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":point("32.84,67.14"),"sendTime":datetime("2010-05-13T10:10:00"),"referredTopics":{{"ccast","shortcut-menu"}},"messageText":"
 like ccast its shortcut-menu is awesome:)"}
-{"chirpId":"3","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("29.72,75.8"),"sendTime":datetime("2006-11-04T10:10:00"),"referredTopics":{{"product-w","speed"}},"messageText":"
 like product-w the speed is good:)"}
-{"chirpId":"4","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("39.28,70.48"),"sendTime":datetime("2011-12-26T10:10:00"),"referredTopics":{{"product-b","voice-command"}},"messageText":"
 like product-b the voice-command is mind-blowing:)"}
-{"chirpId":"5","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("40.09,92.69"),"sendTime":datetime("2006-08-04T10:10:00"),"referredTopics":{{"product-w","speed"}},"messageText":"
 can't stand product-w its speed is terrible:("}
-{"chirpId":"6","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":point("47.51,83.99"),"sendTime":datetime("2010-05-07T10:10:00"),"referredTopics":{{"x-phone","voice-clarity"}},"messageText":"
 like x-phone the voice-clarity is good:)"}
-{"chirpId":"7","user":{"screenName":"ChangEwing_573","lang":"en","friendsCount":182,"statusesCount":394,"name":"Chang
 
Ewing","followersCount":32136},"senderLocation":point("36.21,72.6"),"sendTime":datetime("2011-08-25T10:10:00"),"referredTopics":{{"product-y","platform"}},"messageText":"
 like product-y the platform is good"}
-{"chirpId":"8","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("46.05,93.34"),"sendTime":datetime("2005-10-14T10:10:00"),"referredTopics":{{"product-z","shortcut-menu"}},"messageText":"
 like product-z the shortcut-menu is awesome:)"}
-{"chirpId":"9","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":point("36.86,74.62"),"sendTime":datetime("2012-07-21T10:10:00"),"referredTopics":{{"ccast","voicemail-service"}},"messageText":"
 love ccast its voicemail-service is awesome"}
-{"chirpId":"10","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":point("29.15,76.53"),"sendTime":datetime("2008-01-26T10:10:00"),"referredTopics":{{"ccast","voice-clarity"}},"messageText":"
 hate ccast its voice-clarity is OMG:("}
-{"chirpId":"11","user":{"screenName":"NilaMilliron_tw","lang":"en","friendsCount":445,"statusesCount":164,"name":"Nila
 
Milliron","followersCount":22649},"senderLocation":point("37.59,68.42"),"sendTime":datetime("2008-03-09T10:10:00"),"referredTopics":{{"x-phone","platform"}},"messageText":"
 can't stand x-phone its platform is terrible"}
-{"chirpId":"12","user":{"screenName":"OliJackson_512","lang":"en","friendsCount":445,"statusesCount":164,"name":"Oli
 
Jackson","followersCount":22649},"senderLocation":point("24.82,94.63"),"sendTime":datetime("2010-02-13T10:10:00"),"referredTopics":{{"product-y","voice-command"}},"messageText":"
 like product-y the voice-command is amazing:)"}
+{"chirpId":"1","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(47.44,80.65),"sendTime":datetime("2008-04-26T10:10:00"),"referredTopics":{{"product-z","customization"}},"messageText":"
 love product-z its customization is good:)"}
+{"chirpId":"2","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":st_make_point(32.84,67.14),"sendTime":datetime("2010-05-13T10:10:00"),"referredTopics":{{"ccast","shortcut-menu"}},"messageText":"
 like ccast its shortcut-menu is awesome:)"}
+{"chirpId":"3","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(29.72,75.8),"sendTime":datetime("2006-11-04T10:10:00"),"referredTopics":{{"product-w","speed"}},"messageText":"
 like product-w the speed is good:)"}
+{"chirpId":"4","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(39.28,70.48),"sendTime":datetime("2011-12-26T10:10:00"),"referredTopics":{{"product-b","voice-command"}},"messageText":"
 like product-b the voice-command is mind-blowing:)"}
+{"chirpId":"5","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(40.09,92.69),"sendTime":datetime("2006-08-04T10:10:00"),"referredTopics":{{"product-w","speed"}},"messageText":"
 can't stand product-w its speed is terrible:("}
+{"chirpId":"6","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":st_make_point(47.51,83.99),"sendTime":datetime("2010-05-07T10:10:00"),"referredTopics":{{"x-phone","voice-clarity"}},"messageText":"
 like x-phone the voice-clarity is good:)"}
+{"chirpId":"7","user":{"screenName":"ChangEwing_573","lang":"en","friendsCount":182,"statusesCount":394,"name":"Chang
 
Ewing","followersCount":32136},"senderLocation":st_make_point(36.21,72.6),"sendTime":datetime("2011-08-25T10:10:00"),"referredTopics":{{"product-y","platform"}},"messageText":"
 like product-y the platform is good"}
+{"chirpId":"8","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(46.05,93.34),"sendTime":datetime("2005-10-14T10:10:00"),"referredTopics":{{"product-z","shortcut-menu"}},"messageText":"
 like product-z the shortcut-menu is awesome:)"}
+{"chirpId":"9","user":{"screenName":"NathanGiesen@211","lang":"en","friendsCount":39339,"statusesCount":473,"name":"Nathan
 
Giesen","followersCount":49416},"senderLocation":st_make_point(36.86,74.62),"sendTime":datetime("2012-07-21T10:10:00"),"referredTopics":{{"ccast","voicemail-service"}},"messageText":"
 love ccast its voicemail-service is awesome"}
+{"chirpId":"10","user":{"screenName":"ColineGeyer@63","lang":"en","friendsCount":121,"statusesCount":362,"name":"Coline
 
Geyer","followersCount":17159},"senderLocation":st_make_point(29.15,76.53),"sendTime":datetime("2008-01-26T10:10:00"),"referredTopics":{{"ccast","voice-clarity"}},"messageText":"
 hate ccast its voice-clarity is OMG:("}
+{"chirpId":"11","user":{"screenName":"NilaMilliron_tw","lang":"en","friendsCount":445,"statusesCount":164,"name":"Nila
 
Milliron","followersCount":22649},"senderLocation":st_make_point(37.59,68.42),"sendTime":datetime("2008-03-09T10:10:00"),"referredTopics":{{"x-phone","platform"}},"messageText":"
 can't stand x-phone its platform is terrible"}
+{"chirpId":"12","user":{"screenName":"OliJackson_512","lang":"en","friendsCount":445,"statusesCount":164,"name":"Oli
 
Jackson","followersCount":22649},"senderLocation":st_make_point(24.82,94.63),"sendTime":datetime("2010-02-13T10:10:00"),"referredTopics":{{"product-y","voice-command"}},"messageText":"
 like product-y the voice-command is amazing:)"}
\ No newline at end of file
diff --git a/asterixdb/asterix-doc/src/site/resources/data/gbm.adm 
b/asterixdb/asterix-doc/src/site/resources/data/gbm.adm
index 0dcba7a61a..908326dd30 100644
--- a/asterixdb/asterix-doc/src/site/resources/data/gbm.adm
+++ b/asterixdb/asterix-doc/src/site/resources/data/gbm.adm
@@ -1,15 +1,15 @@
-{"messageId":1,"authorId":3,"inResponseTo":2,"senderLocation":point("47.16,77.75"),"message":"
 love product-b its shortcut-menu is awesome:)"}
-{"messageId":2,"authorId":1,"inResponseTo":4,"senderLocation":point("41.66,80.87"),"message":"
 dislike x-phone its touch-screen is horrible"}
-{"messageId":3,"authorId":2,"inResponseTo":4,"senderLocation":point("48.09,81.01"),"message":"
 like product-y the plan is amazing"}
-{"messageId":4,"authorId":1,"inResponseTo":2,"senderLocation":point("37.73,97.04"),"message":"
 can't stand acast the network is horrible:("}
-{"messageId":5,"authorId":6,"inResponseTo":2,"senderLocation":point("34.7,90.76"),"message":"
 love product-b the customization is mind-blowing"}
-{"messageId":6,"authorId":2,"inResponseTo":1,"senderLocation":point("31.5,75.56"),"message":"
 like product-z its platform is mind-blowing"}
-{"messageId":7,"authorId":5,"inResponseTo":15,"senderLocation":point("32.91,85.05"),"message":"
 dislike product-b the speed is horrible"}
-{"messageId":8,"authorId":1,"inResponseTo":11,"senderLocation":point("40.33,80.87"),"message":"
 like ccast the 3G is awesome:)"}
-{"messageId":9,"authorId":3,"inResponseTo":12,"senderLocation":point("34.45,96.48"),"message":"
 love ccast its wireless is good"}
-{"messageId":10,"authorId":1,"inResponseTo":12,"senderLocation":point("42.5,70.01"),"message":"
 can't stand product-w the touch-screen is terrible"}
-{"messageId":11,"authorId":1,"inResponseTo":1,"senderLocation":point("38.97,77.49"),"message":"
 can't stand acast its plan is terrible"}
-{"messageId":12,"authorId":10,"inResponseTo":6,"senderLocation":point("42.26,77.76"),"message":"
 can't stand product-z its voicemail-service is OMG:("}
-{"messageId":13,"authorId":10,"inResponseTo":4,"senderLocation":point("42.77,78.92"),"message":"
 dislike x-phone the voice-command is bad:("}
-{"messageId":14,"authorId":9,"inResponseTo":12,"senderLocation":point("41.33,85.28"),"message":"
 love acast its 3G is good:)"}
-{"messageId":15,"authorId":7,"inResponseTo":11,"senderLocation":point("44.47,67.11"),"message":"
 like x-phone the voicemail-service is awesome"}
+{"messageId":1,"authorId":3,"inResponseTo":2,"senderLocation":st_make_point(47.16,77.75),"message":"
 love product-b its shortcut-menu is awesome:)"}
+{"messageId":2,"authorId":1,"inResponseTo":4,"senderLocation":st_make_point(41.66,80.87),"message":"
 dislike x-phone its touch-screen is horrible"}
+{"messageId":3,"authorId":2,"inResponseTo":4,"senderLocation":st_make_point(48.09,81.01),"message":"
 like product-y the plan is amazing"}
+{"messageId":4,"authorId":1,"inResponseTo":2,"senderLocation":st_make_point(37.73,97.04),"message":"
 can't stand acast the network is horrible:("}
+{"messageId":5,"authorId":6,"inResponseTo":2,"senderLocation":st_make_point(34.7,90.76),"message":"
 love product-b the customization is mind-blowing"}
+{"messageId":6,"authorId":2,"inResponseTo":1,"senderLocation":st_make_point(31.5,75.56),"message":"
 like product-z its platform is mind-blowing"}
+{"messageId":7,"authorId":5,"inResponseTo":15,"senderLocation":st_make_point(32.91,85.05),"message":"
 dislike product-b the speed is horrible"}
+{"messageId":8,"authorId":1,"inResponseTo":11,"senderLocation":st_make_point(40.33,80.87),"message":"
 like ccast the 3G is awesome:)"}
+{"messageId":9,"authorId":3,"inResponseTo":12,"senderLocation":st_make_point(34.45,96.48),"message":"
 love ccast its wireless is good"}
+{"messageId":10,"authorId":1,"inResponseTo":12,"senderLocation":st_make_point(42.5,70.01),"message":"
 can't stand product-w the touch-screen is terrible"}
+{"messageId":11,"authorId":1,"inResponseTo":1,"senderLocation":st_make_point(38.97,77.49),"message":"
 can't stand acast its plan is terrible"}
+{"messageId":12,"authorId":10,"inResponseTo":6,"senderLocation":st_make_point(42.26,77.76),"message":"
 can't stand product-z its voicemail-service is OMG:("}
+{"messageId":13,"authorId":10,"inResponseTo":4,"senderLocation":st_make_point(42.77,78.92),"message":"
 dislike x-phone the voice-command is bad:("}
+{"messageId":14,"authorId":9,"inResponseTo":12,"senderLocation":st_make_point(41.33,85.28),"message":"
 love acast its 3G is good:)"}
+{"messageId":15,"authorId":7,"inResponseTo":11,"senderLocation":st_make_point(44.47,67.11),"message":"
 like x-phone the voicemail-service is awesome"}
diff --git a/asterixdb/asterix-doc/src/site/site.xml 
b/asterixdb/asterix-doc/src/site/site.xml
index 5c837d2641..4188eb6ad9 100644
--- a/asterixdb/asterix-doc/src/site/site.xml
+++ b/asterixdb/asterix-doc/src/site/site.xml
@@ -68,6 +68,7 @@
       <item name="Option 1: using NCService" href="ncservice.html"/>
       <item name="Option 2: using Ansible" href="ansible.html"/>
       <item name="Option 3: using Amazon Web Services" href="aws.html"/>
+      <item name="Option 4: using Podman Container" href="podman.html"/>
     </menu>
 
     <menu name = "AsterixDB Primer">
diff --git a/asterixdb/asterix-podman/pom.xml b/asterixdb/asterix-podman/pom.xml
index cdd5447c1d..6c1e15848e 100644
--- a/asterixdb/asterix-podman/pom.xml
+++ b/asterixdb/asterix-podman/pom.xml
@@ -162,6 +162,70 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>podman.img</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>nl.lexemmens</groupId>
+                        <artifactId>podman-maven-plugin</artifactId>
+                        <version>1.11.1</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                                <phase>package</phase>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <skipAuth>true</skipAuth>
+                            <images>
+                                <image>
+                                    <name>apache/asterixdb</name>
+                                    <build>
+                                        <pull>true</pull>
+                                        <createLatestTag>true</createLatestTag>
+                                        
<containerFileDir>src/main/resources</containerFileDir>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-resources-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>copy-external-data-resources</id>
+                                <phase>generate-resources</phase>
+                                <goals>
+                                    <goal>copy-resources</goal>
+                                </goals>
+                                <configuration>
+                                    <outputDirectory>target/</outputDirectory>
+                                    <overwrite>true</overwrite>
+                                    <resources>
+                                        <resource>
+                                            
<directory>../asterix-server/target</directory>
+                                            <includes>
+                                                
<include>asterix-server-*-binary-assembly.tar.bz2/</include>
+                                            </includes>
+                                        </resource>
+                                        <resource>
+                                            
<directory>src/main/resources</directory>
+                                            <includes>
+                                                
<include>entrypoint.sh</include>
+                                                <include>cc.conf</include>
+                                            </includes>
+                                        </resource>
+                                    </resources>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>
diff --git a/asterixdb/asterix-podman/src/main/resources/Containerfile 
b/asterixdb/asterix-podman/src/main/resources/Containerfile
new file mode 100644
index 0000000000..c49ec2e5a9
--- /dev/null
+++ b/asterixdb/asterix-podman/src/main/resources/Containerfile
@@ -0,0 +1,49 @@
+###############################################################################
+#  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.
+###############################################################################
+
+FROM eclipse-temurin:21-jre-jammy AS install
+ENV TZ = Etc/UTC
+ENV DEBIAN_FRONTEND=noninteractive
+ENV ASTERIX_DIR=/opt/apache-asterixdb
+RUN apt update; \
+    apt -y install lbzip2
+
+
+COPY target/asterix-server-0.9.10-SNAPSHOT-binary-assembly.tar.bz2 
asterix.tar.bz2
+RUN mkdir -p $ASTERIX_DIR && \
+    tar -xf asterix.tar.bz2 --strip-components=1 -C $ASTERIX_DIR
+
+FROM eclipse-temurin:21-jre-jammy
+ENV TZ = Etc/UTC
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt update; \
+    apt -y upgrade
+ENV ASTERIX_HOME=/var/lib/asterix
+ENV PATH=$ASTERIX_HOME/bin:$PATH
+ENV ASTERIX_DIR=/opt/apache-asterixdb
+COPY target/entrypoint.sh entrypoint.sh
+RUN mkdir -p /var/lib/asterix/data && \
+    groupadd --system asterix && \
+    useradd --system --home-dir $ASTERIX_HOME --gid=asterix asterix && \
+    chown -R asterix:asterix /var/lib/asterix && \
+    chmod +x /entrypoint.sh
+COPY --from=install $ASTERIX_DIR $ASTERIX_DIR
+RUN chown -R asterix:asterix /opt/apache-asterixdb     
+USER asterix:asterix
+ENTRYPOINT ["/entrypoint.sh"]
+EXPOSE 19001 19002 19004 19006 19007 1098 1099
diff --git a/asterixdb/asterix-podman/src/main/resources/entrypoint.sh 
b/asterixdb/asterix-podman/src/main/resources/entrypoint.sh
new file mode 100644
index 0000000000..bb4ff61b1b
--- /dev/null
+++ b/asterixdb/asterix-podman/src/main/resources/entrypoint.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+# 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.
+BAKED_CONF_FILE=${ASTERIX_DIR}/conf/cc.conf
+
+orig_args=("$@")
+num_args=$#
+user_config=0
+
+while [[ "$num_args" -gt 0 ]]
+do
+  arg="$1"
+  if [ $arg = "-config-file" ]; then
+      user_config=1
+  fi
+  shift
+  ((num_args--))
+done
+
+cd "$HOME" || exit
+
+if (( user_config == 0)); then
+  echo "Using default configuration"
+  exec "$ASTERIX_DIR/bin/asterixccnc" "-config-file" "$BAKED_CONF_FILE" "--nc" 
"-node-id" "1" "-cluster-address" "127.0.0.1" "${orig_args[@]}"
+else
+  echo "Configuration supplied, bypassing defaults"
+  exec "$ASTERIX_DIR/bin/asterixccnc" "${orig_args[@]}"
+fi
diff --git a/asterixdb/asterix-podman/src/test/resources/socktest/Containerfile 
b/asterixdb/asterix-podman/src/test/resources/socktest/Containerfile
index a7546d5a7d..ed9f1a767c 100644
--- a/asterixdb/asterix-podman/src/test/resources/socktest/Containerfile
+++ b/asterixdb/asterix-podman/src/test/resources/socktest/Containerfile
@@ -1,17 +1,26 @@
-FROM ubuntu:22.04
+FROM eclipse-temurin:21-jre-jammy
+ENV ASTERIX_DIR=/opt/apache-asterixdb
+
 RUN apt -y update
-RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install systemd 
openjdk-17-jre-headless unzip wget curl python3-pip python3-venv python3-systemd
+RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install systemd unzip 
wget curl python3-pip python3-venv python3-systemd
 RUN pip3 install shiv msgpack
-COPY target/asterix-server_*all.deb .
-RUN dpkg -i asterix-server*.deb
-COPY src/test/resources/cc.conf /opt/apache-asterixdb/cc.conf
-COPY src/test/resources/passwd /opt/apache-asterixdb/etc/passwd
-RUN mkdir -p /etc/systemd/system/[email protected]/
+# --- Add and unpack the Asterix tarball ---
+COPY target/asterix-server-*-binary-assembly.tar.bz2 /asterix.tar.bz2
+RUN mkdir -p $ASTERIX_DIR && \
+    tar -xf /asterix.tar.bz2 --strip-components=1 -C $ASTERIX_DIR
+
+# --- Config and credential setup ---
+COPY src/test/resources/cc.conf $ASTERIX_DIR/cc.conf
+COPY src/test/resources/passwd $ASTERIX_DIR/etc/passwd
 COPY src/test/resources/testenv.conf /etc/systemd/system/[email protected]/
 COPY src/test/resources/setup.sh /opt
 RUN chmod +x /opt/setup.sh
+
+# --- Enable services for test environment ---
 RUN systemctl enable asterix-nc asterix-cc pyudf.socket
 
-EXPOSE 19001 19002 19004
+# --- Expose necessary ports ---
+EXPOSE 19001 19002 19004 19006 19007 1098 1099
 
-CMD [ "/lib/systemd/systemd" ]
+# --- Run systemd as PID 1 ---
+CMD ["/lib/systemd/systemd"]
\ No newline at end of file
diff --git a/asterixdb/asterix-server/pom.xml b/asterixdb/asterix-server/pom.xml
index a20659c8ec..eaa74f31a3 100644
--- a/asterixdb/asterix-server/pom.xml
+++ b/asterixdb/asterix-server/pom.xml
@@ -834,6 +834,17 @@
                 
<commandLineArgument>org.apache.asterix.hyracks.bootstrap.CCApplication</commandLineArgument>
               </commandLineArguments>
             </program>
+            <program>
+              <platforms>
+                <platform>unix</platform>
+              </platforms>
+              <name>asterixccnc</name>
+              
<mainClass>org.apache.asterix.hyracks.bootstrap.CCNCApplication</mainClass>
+              <commandLineArguments>
+                <commandLineArgument>-app-class</commandLineArgument>
+                
<commandLineArgument>org.apache.asterix.hyracks.bootstrap.NCApplication</commandLineArgument>
+              </commandLineArguments>
+            </program>
             <program>
               <platforms>
                 <platform>unix</platform>
diff --git a/asterixdb/asterix-server/src/conf/cc.conf 
b/asterixdb/asterix-server/src/conf/cc.conf
new file mode 100644
index 0000000000..d394b97616
--- /dev/null
+++ b/asterixdb/asterix-server/src/conf/cc.conf
@@ -0,0 +1,27 @@
+; 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.
+
+[nc/1]
+nc.api.port=19004
+iodevices=./io1,./io2,./io3
+ncservice.port=-1
+
+[cc]
+
+[common]
+default.dir = .
+log.level = INFO
diff --git a/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml 
b/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml
index c84cec008b..1a2056b098 100644
--- a/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml
+++ b/asterixdb/asterix-server/src/main/assembly/binary-assembly.xml
@@ -23,6 +23,7 @@
   <formats>
     <format>zip</format>
     <format>dir</format>
+    <format>tar.bz2</format>
   </formats>
   <includeBaseDirectory>false</includeBaseDirectory>
   <fileSets>
@@ -42,6 +43,11 @@
       </excludes>
       <filtered>true</filtered>
     </fileSet>
+    <fileSet>
+      <directory>src/conf</directory>
+      
<outputDirectory>apache-asterixdb-${project.version}/conf</outputDirectory>
+      <filtered>true</filtered>
+    </fileSet>
     <fileSet>
       <directory>src/main/opt</directory>
       
<outputDirectory>apache-asterixdb-${project.version}/opt</outputDirectory>


Reply via email to