Merge "Merge branch 'gerrit/goldfish' into 'master'"
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AbstractComplexExpectedSchemaNode.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AbstractComplexExpectedSchemaNode.java
index 7b26cf6..34ff582 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AbstractComplexExpectedSchemaNode.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AbstractComplexExpectedSchemaNode.java
@@ -18,13 +18,14 @@
*/
package org.apache.asterix.optimizer.rules.pushdown.schema;
-import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
public abstract class AbstractComplexExpectedSchemaNode extends AbstractExpectedSchemaNode {
- AbstractComplexExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, SourceLocation sourceLocation,
- String functionName) {
- super(parent, sourceLocation, functionName);
+ AbstractComplexExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent,
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
+ super(parent, parentExpression, expression);
}
@Override
@@ -33,8 +34,8 @@
}
@Override
- public IExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType, SourceLocation sourceLocation,
- String functionName) {
+ public IExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType,
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
//If no change is required, return the same node
IExpectedSchemaNode node = this;
if (expectedNodeType == ExpectedSchemaNodeType.ANY) {
@@ -47,7 +48,7 @@
* In this case, we first saw (t.hashtags[*].text), but the next expression (t.hashtags) requested
* the entire hashtags. So, the expected type for hashtags should be ANY
*/
- node = new AnyExpectedSchemaNode(getParent(), getSourceLocation(), getFunctionName(), false);
+ node = new AnyExpectedSchemaNode(getParent(), getParentExpression(), false);
getParent().replaceChild(this, node);
} else if (expectedNodeType != getType()) {
/*
@@ -56,8 +57,7 @@
*/
//Create UNION node and its parent is the parent of this
- UnionExpectedSchemaNode unionSchemaNode =
- new UnionExpectedSchemaNode(getParent(), getSourceLocation(), getFunctionName());
+ UnionExpectedSchemaNode unionSchemaNode = new UnionExpectedSchemaNode(getParent(), getParentExpression());
//Add this as a child of UNION
unionSchemaNode.addChild(this);
@@ -78,7 +78,7 @@
* Before: UNION <-- this
* After: UNION <-- (this, newChild)
*/
- unionSchemaNode.createChild(expectedNodeType, sourceLocation, functionName);
+ unionSchemaNode.createChild(expectedNodeType, parentExpression, expression);
node = unionSchemaNode;
}
return node;
@@ -105,15 +105,23 @@
|| newType == ExpectedSchemaNodeType.UNION || !newNode.allowsReplacing());
}
+ /**
+ * @return true if {@code newNode} is a replaceable {@link ExpectedSchemaNodeType#ANY} node, false otherwise
+ */
+ protected boolean isReplaceableAny(IExpectedSchemaNode newNode) {
+ return newNode.getType() == ExpectedSchemaNodeType.ANY && newNode.allowsReplacing();
+ }
+
public static AbstractComplexExpectedSchemaNode createNestedNode(ExpectedSchemaNodeType type,
- AbstractComplexExpectedSchemaNode parent, SourceLocation sourceLocation, String functionName) {
+ AbstractComplexExpectedSchemaNode parent, AbstractFunctionCallExpression parentExpression,
+ ILogicalExpression myExpr) {
switch (type) {
case ARRAY:
- return new ArrayExpectedSchemaNode(parent, sourceLocation, functionName);
+ return new ArrayExpectedSchemaNode(parent, parentExpression, myExpr);
case OBJECT:
- return new ObjectExpectedSchemaNode(parent, sourceLocation, functionName);
+ return new ObjectExpectedSchemaNode(parent, parentExpression, myExpr);
case UNION:
- return new UnionExpectedSchemaNode(parent, sourceLocation, functionName);
+ return new UnionExpectedSchemaNode(parent, parentExpression);
default:
throw new IllegalStateException(type + " is not nested or unknown");
}
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AbstractExpectedSchemaNode.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AbstractExpectedSchemaNode.java
index b895781..379fea3 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AbstractExpectedSchemaNode.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AbstractExpectedSchemaNode.java
@@ -18,18 +18,21 @@
*/
package org.apache.asterix.optimizer.rules.pushdown.schema;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.base.LogicalExpressionTag;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
import org.apache.hyracks.api.exceptions.SourceLocation;
abstract class AbstractExpectedSchemaNode implements IExpectedSchemaNode {
+ protected final AbstractFunctionCallExpression parentExpression;
+ protected final ILogicalExpression expression;
private AbstractComplexExpectedSchemaNode parent;
- private final SourceLocation sourceLocation;
- private final String functionName;
- AbstractExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, SourceLocation sourceLocation,
- String functionName) {
+ AbstractExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent,
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
+ this.parentExpression = parentExpression;
+ this.expression = expression;
this.parent = parent;
- this.sourceLocation = sourceLocation;
- this.functionName = functionName;
}
@Override
@@ -39,12 +42,25 @@
@Override
public final SourceLocation getSourceLocation() {
- return sourceLocation;
+ return expression.getSourceLocation();
}
@Override
public final String getFunctionName() {
- return functionName;
+ if (expression.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
+ return ((AbstractFunctionCallExpression) expression).getFunctionIdentifier().getName();
+ }
+ return null;
+ }
+
+ @Override
+ public AbstractFunctionCallExpression getParentExpression() {
+ return parentExpression;
+ }
+
+ @Override
+ public ILogicalExpression getExpression() {
+ return expression;
}
@Override
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AnyExpectedSchemaNode.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AnyExpectedSchemaNode.java
index 80069e3..fc3046b 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AnyExpectedSchemaNode.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/AnyExpectedSchemaNode.java
@@ -18,20 +18,22 @@
*/
package org.apache.asterix.optimizer.rules.pushdown.schema;
-import org.apache.hyracks.api.exceptions.SourceLocation;
+import static org.apache.asterix.optimizer.rules.pushdown.schema.AbstractComplexExpectedSchemaNode.createNestedNode;
+
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
public class AnyExpectedSchemaNode extends AbstractExpectedSchemaNode {
private boolean replaceable;
- public AnyExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, SourceLocation sourceLocation,
- String functionName) {
- super(parent, sourceLocation, functionName);
+ public AnyExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, AbstractFunctionCallExpression expression) {
+ super(parent, expression, expression);
replaceable = true;
}
- protected AnyExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, SourceLocation sourceLocation,
- String functionName, boolean replaceable) {
- super(parent, sourceLocation, functionName);
+ protected AnyExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, AbstractFunctionCallExpression expression,
+ boolean replaceable) {
+ super(parent, expression, expression);
this.replaceable = replaceable;
}
@@ -45,8 +47,8 @@
}
@Override
- public IExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType, SourceLocation sourceLocation,
- String functionName) {
+ public IExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType,
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
if (expectedNodeType == ExpectedSchemaNodeType.ANY) {
return this;
}
@@ -57,8 +59,8 @@
* the given nested type.
*/
AbstractComplexExpectedSchemaNode parent = getParent();
- AbstractComplexExpectedSchemaNode nestedNode = AbstractComplexExpectedSchemaNode
- .createNestedNode(expectedNodeType, parent, getSourceLocation(), functionName);
+ AbstractComplexExpectedSchemaNode nestedNode =
+ createNestedNode(expectedNodeType, parent, this.parentExpression, expression);
return parent.replaceChild(this, nestedNode);
}
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ArrayExpectedSchemaNode.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ArrayExpectedSchemaNode.java
index 57e0d98..b8135b7 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ArrayExpectedSchemaNode.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ArrayExpectedSchemaNode.java
@@ -18,14 +18,15 @@
*/
package org.apache.asterix.optimizer.rules.pushdown.schema;
-import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
public class ArrayExpectedSchemaNode extends AbstractComplexExpectedSchemaNode {
private IExpectedSchemaNode child;
- public ArrayExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, SourceLocation sourceLocation,
- String functionName) {
- super(parent, sourceLocation, functionName);
+ public ArrayExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent,
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
+ super(parent, parentExpression, expression);
}
@Override
@@ -48,8 +49,8 @@
@Override
public IExpectedSchemaNode replaceChild(IExpectedSchemaNode oldNode, IExpectedSchemaNode newNode) {
- if (child.getType() == newNode.getType()) {
- // We are trying to replace with the same node type
+ if (child.getType() == newNode.getType() || isReplaceableAny(newNode)) {
+ // We are trying to replace with the same node type, or with a replaceable any, ignore.
return child;
} else if (isChildReplaceable(child, newNode)) {
child = newNode;
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ExpectedSchemaBuilder.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ExpectedSchemaBuilder.java
index d42ffed..e442d64 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ExpectedSchemaBuilder.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ExpectedSchemaBuilder.java
@@ -59,8 +59,7 @@
//Parent always nested
AbstractComplexExpectedSchemaNode parent = (AbstractComplexExpectedSchemaNode) buildNestedNode(expr, typeEnv);
if (parent != null) {
- IExpectedSchemaNode leaf =
- new AnyExpectedSchemaNode(parent, expr.getSourceLocation(), expr.getFunctionIdentifier().getName());
+ IExpectedSchemaNode leaf = new AnyExpectedSchemaNode(parent, expr);
IExpectedSchemaNode actualNode = addOrReplaceChild(expr, typeEnv, parent, leaf);
if (producedVar != null) {
//Register the node if a variable is produced
@@ -84,8 +83,9 @@
varToNode.put(variable, RootExpectedSchemaNode.ALL_FIELDS_ROOT_IRREPLACEABLE_NODE);
} else {
// If it is a nested node, replace it to a LEAF node
- AnyExpectedSchemaNode leafNode = (AnyExpectedSchemaNode) node.replaceIfNeeded(ExpectedSchemaNodeType.ANY,
- parent.getSourceLocation(), parent.getFunctionName());
+ // Both expressions are null as they're the node isn't used anymore and the node ANY is not replaceable
+ AnyExpectedSchemaNode leafNode =
+ (AnyExpectedSchemaNode) node.replaceIfNeeded(ExpectedSchemaNodeType.ANY, null, null);
// make the leaf node irreplaceable
leafNode.preventReplacing();
varToNode.put(variable, leafNode);
@@ -118,7 +118,7 @@
if (isVariable(parentExpr)) {
//A variable could be the record's originated from data-scan or an expression from assign
LogicalVariable sourceVar = VariableUtilities.getVariable(parentExpr);
- return changeNodeForVariable(sourceVar, myExpr);
+ return changeNodeForVariable(sourceVar, myExpr, myExpr);
}
//Recursively create the parent nodes. Parent is always a nested node
@@ -134,8 +134,8 @@
* Create 'myNode'. It is a nested node because the function is either getField() or a supported array
* function
*/
- AbstractComplexExpectedSchemaNode myNode = AbstractComplexExpectedSchemaNode.createNestedNode(myType,
- newParent, myExpr.getSourceLocation(), myExpr.getFunctionIdentifier().getName());
+ AbstractComplexExpectedSchemaNode myNode =
+ AbstractComplexExpectedSchemaNode.createNestedNode(myType, newParent, parentFuncExpr, myExpr);
// Add (or replace old child with) myNode to the parent
return addOrReplaceChild(parentFuncExpr, typeEnv, newParent, myNode);
}
@@ -148,7 +148,7 @@
}
private IExpectedSchemaNode changeNodeForVariable(LogicalVariable sourceVar,
- AbstractFunctionCallExpression myExpr) {
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
//Get the associated node with the sourceVar (if any)
IExpectedSchemaNode oldNode = varToNode.get(sourceVar);
if (oldNode == null || !oldNode.allowsReplacing()) {
@@ -157,10 +157,9 @@
return null;
}
//What is the expected type of the variable
- ExpectedSchemaNodeType varExpectedType = getExpectedNestedNodeType(myExpr);
+ ExpectedSchemaNodeType varExpectedType = getExpectedNestedNodeType(parentExpression);
// Get the node associated with the variable (or change its type if needed).
- IExpectedSchemaNode newNode = oldNode.replaceIfNeeded(varExpectedType, myExpr.getSourceLocation(),
- myExpr.getFunctionIdentifier().getName());
+ IExpectedSchemaNode newNode = oldNode.replaceIfNeeded(varExpectedType, parentExpression, expression);
//Map the sourceVar to the node
varToNode.put(sourceVar, newNode);
return newNode;
@@ -195,11 +194,12 @@
private static IExpectedSchemaNode handleObject(AbstractFunctionCallExpression parentExpr,
IVariableTypeEnvironment typeEnv, AbstractComplexExpectedSchemaNode parent, IExpectedSchemaNode child)
throws AlgebricksException {
+ int fieldNameId = PushdownUtil.getFieldNameId(parentExpr);
String fieldName = PushdownUtil.getFieldName(parentExpr, typeEnv);
ObjectExpectedSchemaNode objectNode = (ObjectExpectedSchemaNode) parent;
IExpectedSchemaNode actualChild = objectNode.getChildren().get(fieldName);
if (actualChild == null) {
- objectNode.addChild(fieldName, child);
+ objectNode.addChild(fieldName, fieldNameId, child);
actualChild = child;
} else {
actualChild = objectNode.replaceChild(actualChild, child);
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/IExpectedSchemaNode.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/IExpectedSchemaNode.java
index 345cb84..decafec 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/IExpectedSchemaNode.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/IExpectedSchemaNode.java
@@ -18,7 +18,8 @@
*/
package org.apache.asterix.optimizer.rules.pushdown.schema;
-import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
import org.apache.hyracks.api.exceptions.SourceLocation;
/**
@@ -42,11 +43,21 @@
String getFunctionName();
/**
+ * @return function expression of which determined the type of the parent node
+ */
+ AbstractFunctionCallExpression getParentExpression();
+
+ /**
* @return the parent of a node
*/
AbstractComplexExpectedSchemaNode getParent();
/**
+ * @return this node's expression
+ */
+ ILogicalExpression getExpression();
+
+ /**
* Set parent of a node
*
* @param parent new parent
@@ -75,11 +86,11 @@
* - {@link ExpectedSchemaNodeType#OBJECT} to {@link ExpectedSchemaNodeType#UNION}
*
* @param expectedNodeType what is the other expected type
- * @param sourceLocation source location of the value access
- * @param functionName function name as in {@link FunctionIdentifier#getName()}
- * @see AbstractComplexExpectedSchemaNode#replaceIfNeeded(ExpectedSchemaNodeType, SourceLocation, String)
- * @see UnionExpectedSchemaNode#replaceIfNeeded(ExpectedSchemaNodeType, SourceLocation, String)
+ * @param parentExpression parent expression
+ * @param expression this node's expression
+ * @see IExpectedSchemaNode#replaceIfNeeded(ExpectedSchemaNodeType, AbstractFunctionCallExpression, ILogicalExpression)
+ * @see IExpectedSchemaNode#replaceIfNeeded(ExpectedSchemaNodeType, AbstractFunctionCallExpression, ILogicalExpression)
*/
- IExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType, SourceLocation sourceLocation,
- String functionName);
+ IExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType,
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression);
}
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ObjectExpectedSchemaNode.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ObjectExpectedSchemaNode.java
index aa48e60..e220437 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ObjectExpectedSchemaNode.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/ObjectExpectedSchemaNode.java
@@ -21,27 +21,43 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.asterix.metadata.utils.PushdownUtil;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
public class ObjectExpectedSchemaNode extends AbstractComplexExpectedSchemaNode {
private final Map<String, IExpectedSchemaNode> children;
+ private final Int2ObjectMap<String> fieldIdToFieldName;
- public ObjectExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, SourceLocation sourceLocation,
- String functionName) {
- super(parent, sourceLocation, functionName);
+ public ObjectExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent,
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
+ super(parent, parentExpression, expression);
children = new HashMap<>();
+ fieldIdToFieldName = new Int2ObjectOpenHashMap<>();
}
public boolean isRoot() {
return false;
}
- public Map<String, IExpectedSchemaNode> getChildren() {
- return children;
+ public void addChild(String fieldName, int fieldId, IExpectedSchemaNode child) {
+ FunctionIdentifier fid = child.getParentExpression().getFunctionIdentifier();
+ children.put(fieldName, child);
+ if (fieldId > -1) {
+ fieldIdToFieldName.put(fieldId, fieldName);
+ }
}
- public void addChild(String fieldName, IExpectedSchemaNode child) {
- children.put(fieldName, child);
+ public void addAllFieldNameIds(ObjectExpectedSchemaNode node) {
+ fieldIdToFieldName.putAll(node.fieldIdToFieldName);
+ }
+
+ public Map<String, IExpectedSchemaNode> getChildren() {
+ return children;
}
@Override
@@ -58,8 +74,8 @@
public IExpectedSchemaNode replaceChild(IExpectedSchemaNode oldNode, IExpectedSchemaNode newNode) {
String fieldName = getChildFieldName(oldNode);
IExpectedSchemaNode child = children.get(fieldName);
- if (child.getType() == newNode.getType()) {
- // We are trying to replace with the same node type
+ if (child.getType() == newNode.getType() || isReplaceableAny(newNode)) {
+ // We are trying to replace with the same node type, or with a replaceable any, ignore.
return child;
} else if (isChildReplaceable(child, newNode)) {
children.replace(fieldName, newNode);
@@ -71,18 +87,13 @@
}
public String getChildFieldName(IExpectedSchemaNode requestedChild) {
- String key = null;
- for (Map.Entry<String, IExpectedSchemaNode> child : children.entrySet()) {
- if (child.getValue() == requestedChild) {
- key = child.getKey();
- break;
- }
+ AbstractFunctionCallExpression expr = requestedChild.getParentExpression();
+ int fieldNameId = PushdownUtil.getFieldNameId(requestedChild.getParentExpression());
+
+ if (fieldNameId > -1) {
+ return fieldIdToFieldName.get(fieldNameId);
}
- if (key == null) {
- //this should not happen
- throw new IllegalStateException("Node " + requestedChild.getType() + " is not a child");
- }
- return key;
+ return PushdownUtil.getFieldName(expr);
}
}
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/RootExpectedSchemaNode.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/RootExpectedSchemaNode.java
index 72c5c52..e72e997 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/RootExpectedSchemaNode.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/RootExpectedSchemaNode.java
@@ -18,7 +18,8 @@
*/
package org.apache.asterix.optimizer.rules.pushdown.schema;
-import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
public class RootExpectedSchemaNode extends ObjectExpectedSchemaNode {
//Root with zero fields
@@ -56,7 +57,7 @@
@Override
public AbstractComplexExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType,
- SourceLocation sourceLocation, String functionName) {
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
if (rootType == ALL_FIELDS_ROOT) {
//ALL_FIELDS_ROOT. Return a new CLIPPED_ROOT root
return new RootExpectedSchemaNode();
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/UnionExpectedSchemaNode.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/UnionExpectedSchemaNode.java
index af6d2be..a15e359 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/UnionExpectedSchemaNode.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/schema/UnionExpectedSchemaNode.java
@@ -22,14 +22,15 @@
import java.util.Map;
import java.util.Set;
-import org.apache.hyracks.api.exceptions.SourceLocation;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
public class UnionExpectedSchemaNode extends AbstractComplexExpectedSchemaNode {
private final Map<ExpectedSchemaNodeType, AbstractComplexExpectedSchemaNode> children;
- public UnionExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent, SourceLocation sourceLocation,
- String functionName) {
- super(parent, sourceLocation, functionName);
+ public UnionExpectedSchemaNode(AbstractComplexExpectedSchemaNode parent,
+ AbstractFunctionCallExpression expression) {
+ super(parent, expression, expression);
children = new EnumMap<>(ExpectedSchemaNodeType.class);
}
@@ -46,8 +47,13 @@
children.put(node.getType(), node);
}
- public void createChild(ExpectedSchemaNodeType nodeType, SourceLocation sourceLocation, String functionName) {
- children.computeIfAbsent(nodeType, k -> createNestedNode(k, this, sourceLocation, functionName));
+ public void createChild(ExpectedSchemaNodeType nodeType, AbstractFunctionCallExpression parentExpression,
+ ILogicalExpression expression) {
+ if (parentExpression == null) {
+ // Should never happen
+ throw new NullPointerException("expression is null");
+ }
+ children.computeIfAbsent(nodeType, k -> createNestedNode(k, this, parentExpression, expression));
}
public AbstractComplexExpectedSchemaNode getChild(ExpectedSchemaNodeType type) {
@@ -73,15 +79,15 @@
* UNION type - we simply return this. In case we want to fallback to ANY node, we call the super method.
*
* @param expectedNodeType the expected type
- * @param sourceLocation source location of the value access
- * @param functionName function name of the expression
+ * @param parentExpression
+ * @param expression
* @return ANY or this
*/
@Override
- public IExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType, SourceLocation sourceLocation,
- String functionName) {
+ public IExpectedSchemaNode replaceIfNeeded(ExpectedSchemaNodeType expectedNodeType,
+ AbstractFunctionCallExpression parentExpression, ILogicalExpression expression) {
if (expectedNodeType == ExpectedSchemaNodeType.ANY) {
- return super.replaceIfNeeded(expectedNodeType, sourceLocation, functionName);
+ return super.replaceIfNeeded(expectedNodeType, parentExpression, expression);
}
return this;
}
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/ExpectedSchemaMergerVisitor.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/ExpectedSchemaMergerVisitor.java
index d9ab052..09046b2 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/ExpectedSchemaMergerVisitor.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/ExpectedSchemaMergerVisitor.java
@@ -70,19 +70,23 @@
// combine
RootExpectedSchemaNode mergedRoot = (RootExpectedSchemaNode) RootExpectedSchemaNode.ALL_FIELDS_ROOT_NODE
- .replaceIfNeeded(ExpectedSchemaNodeType.OBJECT, node.getSourceLocation(), node.getFunctionName());
+ .replaceIfNeeded(ExpectedSchemaNodeType.OBJECT, null, null);
mergeObjectFields(mergedRoot, node.getChildren(), argRoot.getChildren());
+ mergedRoot.addAllFieldNameIds(node);
+ mergedRoot.addAllFieldNameIds(argRoot);
return mergedRoot;
}
@Override
public IExpectedSchemaNode visit(ObjectExpectedSchemaNode node, IExpectedSchemaNode arg) {
ObjectExpectedSchemaNode mergedObject =
- new ObjectExpectedSchemaNode(currentParent, node.getSourceLocation(), node.getFunctionName());
+ new ObjectExpectedSchemaNode(currentParent, node.getParentExpression(), node.getExpression());
Map<String, IExpectedSchemaNode> argChildren = Collections.emptyMap();
+ mergedObject.addAllFieldNameIds(node);
if (arg != null) {
ObjectExpectedSchemaNode argObject = (ObjectExpectedSchemaNode) arg;
argChildren = argObject.getChildren();
+ mergedObject.addAllFieldNameIds(argObject);
}
mergeObjectFields(mergedObject, node.getChildren(), argChildren);
@@ -99,7 +103,7 @@
argItem = arrayArg.getChild();
}
ArrayExpectedSchemaNode mergedArray =
- new ArrayExpectedSchemaNode(currentParent, node.getSourceLocation(), node.getFunctionName());
+ new ArrayExpectedSchemaNode(currentParent, node.getParentExpression(), node.getExpression());
AbstractComplexExpectedSchemaNode previousParent = currentParent;
currentParent = mergedArray;
IExpectedSchemaNode mergedItem = merge(nodeItem, argItem);
@@ -111,8 +115,7 @@
@Override
public IExpectedSchemaNode visit(UnionExpectedSchemaNode node, IExpectedSchemaNode arg) {
- UnionExpectedSchemaNode union =
- new UnionExpectedSchemaNode(currentParent, node.getSourceLocation(), node.getFunctionName());
+ UnionExpectedSchemaNode union = new UnionExpectedSchemaNode(currentParent, node.getParentExpression());
AbstractComplexExpectedSchemaNode previousParent = currentParent;
currentParent = union;
@@ -148,7 +151,7 @@
@Override
public IExpectedSchemaNode visit(AnyExpectedSchemaNode node, IExpectedSchemaNode arg) {
- return new AnyExpectedSchemaNode(currentParent, node.getSourceLocation(), node.getFunctionName());
+ return new AnyExpectedSchemaNode(currentParent, node.getParentExpression());
}
private void mergeObjectFields(ObjectExpectedSchemaNode objectNode, Map<String, IExpectedSchemaNode> left,
@@ -170,7 +173,7 @@
}
IExpectedSchemaNode rightChild = right.get(fieldName);
IExpectedSchemaNode mergedChild = merge(leftChild.getValue(), rightChild);
- objectNode.addChild(fieldName, mergedChild);
+ objectNode.addChild(fieldName, -1, mergedChild);
mergedFields.add(fieldName);
}
}
@@ -196,8 +199,7 @@
}
private IExpectedSchemaNode createUnionNode(IExpectedSchemaNode leftChild, IExpectedSchemaNode rightChild) {
- UnionExpectedSchemaNode union =
- new UnionExpectedSchemaNode(currentParent, leftChild.getSourceLocation(), leftChild.getFunctionName());
+ UnionExpectedSchemaNode union = new UnionExpectedSchemaNode(currentParent, leftChild.getParentExpression());
AbstractComplexExpectedSchemaNode previousParent = currentParent;
currentParent = union;
// Create a copy of leftChild
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/ExpressionToExpectedSchemaNodeVisitor.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/ExpressionToExpectedSchemaNodeVisitor.java
index cccc936..0ef81aa 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/ExpressionToExpectedSchemaNodeVisitor.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/visitor/ExpressionToExpectedSchemaNodeVisitor.java
@@ -111,8 +111,7 @@
}
AbstractComplexExpectedSchemaNode newParent = replaceIfNeeded(parent, expr);
- IExpectedSchemaNode myNode =
- new AnyExpectedSchemaNode(newParent, expr.getSourceLocation(), expr.getFunctionIdentifier().getName());
+ IExpectedSchemaNode myNode = new AnyExpectedSchemaNode(newParent, expr);
ExpectedSchemaBuilder.addOrReplaceChild(expr, typeEnv, newParent, myNode);
return myNode;
}
@@ -120,7 +119,6 @@
private AbstractComplexExpectedSchemaNode replaceIfNeeded(IExpectedSchemaNode parent,
AbstractFunctionCallExpression funcExpr) {
ExpectedSchemaNodeType expectedType = ExpectedSchemaBuilder.getExpectedNestedNodeType(funcExpr);
- return (AbstractComplexExpectedSchemaNode) parent.replaceIfNeeded(expectedType, parent.getSourceLocation(),
- parent.getFunctionName());
+ return (AbstractComplexExpectedSchemaNode) parent.replaceIfNeeded(expectedType, funcExpr, funcExpr);
}
}
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ActiveRequestsServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ActiveRequestsServlet.java
index 7e00e9a..3f1845e 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ActiveRequestsServlet.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ActiveRequestsServlet.java
@@ -55,7 +55,7 @@
protected void delete(IServletRequest request, IServletResponse response) throws IOException {
String uuid = request.getParameter(REQUEST_UUID_PARAM_NAME);
String clientCtxId = request.getParameter(Parameter.CLIENT_ID.str());
- LOGGER.debug("received cancel request, uuid={}, clientCtxId={}", uuid, clientCtxId);
+ LOGGER.info("received cancel request, uuid={}, clientContextId={}", uuid, clientCtxId);
if (uuid == null && clientCtxId == null) {
response.setStatus(HttpResponseStatus.BAD_REQUEST);
return;
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultPrinter.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultPrinter.java
index 2602917..35b4866 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultPrinter.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/result/ResultPrinter.java
@@ -54,11 +54,11 @@
private final Stats stats;
private final ARecordType recordType;
- private boolean indentJSON;
- private boolean quoteRecord;
+ private final boolean indentJSON;
+ private final boolean quoteRecord;
// Whether we are wrapping the output sequence in an array
- private boolean wrapArray = false;
+ private final boolean wrapArray;
// Whether this is the first instance being output
private boolean notFirst = false;
@@ -72,6 +72,7 @@
this.recordType = recordType;
this.indentJSON = conf.is(SessionConfig.FORMAT_INDENT_JSON);
this.quoteRecord = conf.is(SessionConfig.FORMAT_QUOTE_RECORD);
+ this.wrapArray = conf.is(SessionConfig.FORMAT_WRAPPER_ARRAY);
this.resultDisplayFrameMgr = new FrameManager(appCtx.getCompilerProperties().getFrameSize());
if (indentJSON) {
this.om = new ObjectMapper();
@@ -106,7 +107,6 @@
notfirst = true;
app.append('"').append(name.replace("\"", "\"\"")).append('"');
}
- app.append("\r\n");
} catch (IOException e) {
throw HyracksDataException.create(e);
}
@@ -126,9 +126,8 @@
throw HyracksDataException.create(e);
}
- if (conf.is(SessionConfig.FORMAT_WRAPPER_ARRAY)) {
+ if (wrapArray) {
output.out().print("[ ");
- wrapArray = true;
}
if (conf.fmt() == SessionConfig.OutputFormat.CSV && conf.is(SessionConfig.FORMAT_CSV_HEADER)) {
@@ -139,11 +138,13 @@
StringWriter sw = new StringWriter();
appendCSVHeader(sw, recordType);
output.out().print(JSONUtil.quoteAndEscape(sw.toString()));
- output.out().print("\n");
- notFirst = true;
} else {
appendCSVHeader(output.out(), recordType);
}
+ if (!wrapArray) {
+ output.out().println();
+ }
+ notFirst = true;
}
}
@@ -173,10 +174,6 @@
record = result;
}
}
- if (conf.fmt() == SessionConfig.OutputFormat.CSV) {
- // TODO(tillw): this is inefficient as well
- record = record + "\r\n";
- }
if (quoteRecord) {
// TODO(tillw): this is inefficient as well
record = JSONUtil.quoteAndEscape(record);
@@ -210,16 +207,15 @@
for (int tIndex = 0; tIndex < last; tIndex++) {
final int start = fta.getTupleStartOffset(tIndex);
int length = fta.getTupleEndOffset(tIndex) - start;
- if (conf.fmt() == SessionConfig.OutputFormat.CSV
- && ((length > 0) && (frameBytes[start + length - 1] == '\n'))) {
- length--;
- }
String result = new String(frameBytes, start, length, UTF_8);
if (wrapArray && notFirst) {
- output.out().print(", ");
+ output.out().print(',');
}
notFirst = true;
displayRecord(result);
+ if (!wrapArray) {
+ output.out().println();
+ }
}
frameBuffer.clear();
}
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/ResultExtractor.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/ResultExtractor.java
index 05b8bbf..ac85052 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/ResultExtractor.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/ResultExtractor.java
@@ -219,6 +219,7 @@
}
final boolean isJsonFormat = isJsonFormat(fmt);
+ boolean firstResult = true;
// if we have errors field in the results, we will always return it
checkForErrors(result);
@@ -235,6 +236,10 @@
final JsonNode fieldValue = result.get(fieldName);
switch (fieldKind) {
case RESULTS:
+ if (!firstResult) {
+ resultBuilder.append('\n');
+ }
+ firstResult = false;
if (fieldValue.size() <= 1) {
if (fieldValue.size() == 0) {
resultBuilder.append("");
@@ -257,7 +262,7 @@
} else {
for (JsonNode f : fields) {
if (f.isValueNode()) {
- resultBuilder.append(f.asText());
+ resultBuilder.append(f.asText()).append('\n');
} else {
resultBuilder.append(prettyPrint(f)).append('\n');
}
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.022.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.022.query.sqlpp
new file mode 100644
index 0000000..904651b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.022.query.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+-- See ASTERIXDB-3409
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT ht.name, ht.phone,
+ARRAY_COUNT(ht.reviews) AS num_reviews,
+(SELECT VALUE MIN(ratings.Overall) FROM ht.reviews)[0] AS overall_avg,
+(SELECT VALUE ratings.Overall FROM ht.reviews) AS overall_reviews
+FROM ColumnDataset ht
+WHERE ht.city = 'Los Angeles'
+ORDER BY overall_avg DESC
+LIMIT 5;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.023.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.023.query.sqlpp
new file mode 100644
index 0000000..a841c75
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.023.query.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+-- See ASTERIXDB-3471
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT v.payload
+FROM ColumnDataset o
+WHERE v.`type`="WeMo"
+LIMIT 10;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.024.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.024.query.sqlpp
new file mode 100644
index 0000000..52075b9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.024.query.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT c.f1[0].f2[0][0],
+ c.f1[1].f3[1],
+ c.f1[1].f2[1][1]
+FROM ColumnDataset c
+ORDER BY c.x
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.025.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.025.query.sqlpp
new file mode 100644
index 0000000..4ee3627
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.025.query.sqlpp
@@ -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.
+ */
+
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT c.f1[0].f2[0][0],
+ c.f1[1].f3[1],
+ c.f1[1].f2[1][1], c.x
+FROM ColumnDataset c
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.026.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.026.query.sqlpp
new file mode 100644
index 0000000..c2acf29
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.026.query.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT c.f1[0].f2[0][0],
+ c.f1[1].f3[1],
+ c.f1[1].f2[1][1], c.x
+FROM ColumnDataset c
+ORDER BY c.y
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.027.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.027.query.sqlpp
new file mode 100644
index 0000000..03ae71d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/pushdown/other-pushdowns/other-pushdowns.027.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT c.f1[0].f2[0][0],
+ -- Access f3 as an array
+ c.f1[1].f3[1],
+ c.f1[1].f2[1][1],
+ -- Access f3 as an object
+ c.f1[1].f3.f4
+FROM ColumnDataset c
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.001.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.001.ddl.sqlpp
new file mode 100644
index 0000000..93462f6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.001.ddl.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE DATASET RowDataset
+PRIMARY KEY (id: uuid) AUTOGENERATED WITH {
+ "storage-format": {"format" : "row"}
+};
+
+CREATE DATASET ColumnDataset
+PRIMARY KEY (id: uuid) WITH {
+ "storage-format": {"format" : "column"}
+};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.002.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.002.update.sqlpp
new file mode 100644
index 0000000..f3fd0b3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.002.update.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+USE test;
+
+UPSERT INTO RowDataset (
+ SELECT UUID() AS myUUID
+ FROM RANGE(1, 1000) x
+);
+
+UPSERT INTO ColumnDataset (
+ SELECT VALUE r
+ FROM RowDataset r
+);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.003.get.http b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.003.get.http
new file mode 100644
index 0000000..57d830a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.003.get.http
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+/connector?dataverseName=test&datasetName=ColumnDataset
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.004.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.004.query.sqlpp
new file mode 100644
index 0000000..8963312
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/upsert/003/003.004.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+USE test;
+
+SELECT VALUE COUNT(*)
+FROM RowDataset r, ColumnDataset c
+WHERE r.id = c.id
+ AND r.myUUID = c.myUUID;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.12.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.12.query.sqlpp
new file mode 100644
index 0000000..d2802d0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.12.query.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT p.f1[0].f2[0][0],
+ p.f1[1].f3[1],
+ p.f1[1].f2[1][1]
+FROM ParquetDataset1 p
+ORDER BY p.x
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.13.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.13.query.sqlpp
new file mode 100644
index 0000000..49d16af
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.13.query.sqlpp
@@ -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.
+ */
+
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT p.f1[0].f2[0][0],
+ p.f1[1].f3[1],
+ p.f1[1].f2[1][1], p.x
+FROM ParquetDataset1 p
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.14.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.14.query.sqlpp
new file mode 100644
index 0000000..1aa9d9c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.14.query.sqlpp
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT p.f1[0].f2[0][0],
+ p.f1[1].f3[1],
+ p.f1[1].f2[1][1], p.x
+FROM ParquetDataset1 p
+ORDER BY p.y
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.15.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.15.query.sqlpp
new file mode 100644
index 0000000..e8efb25
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-dataset/common/parquet/pushdown-plans/pushdown-plans.15.query.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+USE test;
+SET `compiler.parallelism` "0";
+SET `compiler.sort.parallel` "false";
+EXPLAIN
+SELECT p.f1[0].f2[0][0],
+ -- Access f3 as an array
+ p.f1[1].f3[1],
+ p.f1[1].f2[1][1],
+ -- Access f3 as an object
+ p.f1[1].f3.f4
+FROM ParquetDataset1 p
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cache-residency/cache-residency.001.regexjson b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cache-residency/cache-residency.001.regexjson
index 173a9a5..628e8b0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cache-residency/cache-residency.001.regexjson
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cache-residency/cache-residency.001.regexjson
@@ -4,7 +4,7 @@
"*": "*"
},
"type": "application/x-adm",
- "results": [ "{ \"v\": 1 }\n", "{ \"v\": 2 }\n" ],
+ "results": [ "{ \"v\": 1 }", "{ \"v\": 2 }" ],
"plans": "R{.*}",
"status": "success",
"metrics": {
@@ -13,7 +13,7 @@
"compileTime": "R{.*}",
"queueWaitTime": "R{.*}",
"resultCount": 2,
- "resultSize": 32,
+ "resultSize": "R{.*}",
"processedObjects": 0
}
}
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cache-residency/cache-residency.002.regexjson b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cache-residency/cache-residency.002.regexjson
index 9dcdbb6..7c4f553 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cache-residency/cache-residency.002.regexjson
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cache-residency/cache-residency.002.regexjson
@@ -4,7 +4,7 @@
"*": "*"
},
"type": "application/x-adm",
- "results": [ "{ \"$1\": 17 }\n" ],
+ "results": [ "{ \"$1\": 17 }" ],
"plans": "R{.*}",
"status": "success",
"metrics": {
@@ -13,7 +13,7 @@
"compileTime": "R{.*}",
"queueWaitTime": "R{.*}",
"resultCount": 1,
- "resultSize": 18,
+ "resultSize": "R{.*}",
"processedObjects": 17,
"bufferCacheHitRatio": "100.00%",
"bufferCachePageReadCount": 1
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/format-param-in-accept-01/format-param-in-accept-01.1.regexjson b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/format-param-in-accept-01/format-param-in-accept-01.1.regexjson
index ad8ba0a..0134449 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/format-param-in-accept-01/format-param-in-accept-01.1.regexjson
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/format-param-in-accept-01/format-param-in-accept-01.1.regexjson
@@ -2,7 +2,7 @@
"requestID": "R{[a-zA-Z0-9-]+}",
"signature": {"*": "*"},
"type": "application/x-adm",
- "results": [ "{{ \"foo\", \"bar\" }}\n" ],
+ "results": [ "{{ \"foo\", \"bar\" }}" ],
"plans":{},
"status": "success",
"metrics": "R{.*}"
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/multiple-param-values/multiple-param-values.1.regexjson b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/multiple-param-values/multiple-param-values.1.regexjson
index 0701ef3..aab9677 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/multiple-param-values/multiple-param-values.1.regexjson
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/multiple-param-values/multiple-param-values.1.regexjson
@@ -4,7 +4,7 @@
"*": "*"
},
"type": "application/x-adm",
- "results": [ "{ \"$1\": 1 }\n" ]
+ "results": [ "{ \"$1\": 1 }" ]
,
"plans":{},
"status": "success",
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.022.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.022.plan
new file mode 100644
index 0000000..05bf25c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.022.plan
@@ -0,0 +1,68 @@
+distribute result [$$84] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |UNPARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |UNPARTITIONED|
+ limit 5 [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_LIMIT |UNPARTITIONED|
+ project ([$$84]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$84] <- [{"name": $$93, "phone": $$94, "num_reviews": sql-count($$91), "overall_avg": $#2, "overall_reviews": $$83}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- SORT_MERGE_EXCHANGE [$#2(DESC) ] |PARTITIONED|
+ limit 5 [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_LIMIT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ order (topK: 5) (DESC, $#2) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STABLE_SORT [topK: 5] [$#2(DESC)] |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ subplan {
+ aggregate [$$83] <- [listify($$82)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- AGGREGATE |LOCAL|
+ assign [$$82] <- [$$98.getField("Overall")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |LOCAL|
+ assign [$$98] <- [$$reviews.getField("ratings")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |LOCAL|
+ unnest $$reviews <- scan-collection($$91) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- UNNEST |LOCAL|
+ nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- NESTED_TUPLE_SOURCE |LOCAL|
+ } [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- SUBPLAN |PARTITIONED|
+ project ([$$93, $$94, $$91, $#2]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$#2] <- [get-item($$72, 0)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ subplan {
+ aggregate [$$72] <- [listify($$86)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- AGGREGATE |LOCAL|
+ aggregate [$$86] <- [agg-sql-min($$69)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- AGGREGATE |LOCAL|
+ assign [$$69] <- [$$97.getField("Overall")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |LOCAL|
+ assign [$$97] <- [$$89.getField("ratings")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |LOCAL|
+ unnest $$89 <- scan-collection($$91) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- UNNEST |LOCAL|
+ nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- NESTED_TUPLE_SOURCE |LOCAL|
+ } [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- SUBPLAN |PARTITIONED|
+ project ([$$93, $$94, $$91]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ select (eq($$ht.getField("city"), "Los Angeles")) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_SELECT |PARTITIONED|
+ assign [$$94, $$91, $$93] <- [$$ht.getField("phone"), $$ht.getField("reviews"), $$ht.getField("name")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$ht]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$85, $$ht] <- test.ColumnDataset project ({reviews:[{ratings:{Overall:any}}],phone:any,city:any,name:any}) filter on: eq($$ht.getField("city"), "Los Angeles") range-filter on: eq($$ht.getField("city"), "Los Angeles") [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.023.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.023.plan
new file mode 100644
index 0000000..7ddc1a9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.023.plan
@@ -0,0 +1,28 @@
+distribute result [$$19] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |UNPARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |UNPARTITIONED|
+ limit 10 [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_LIMIT |UNPARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- RANDOM_MERGE_EXCHANGE |PARTITIONED|
+ project ([$$19]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$19] <- [{"payload": $$20.getField("payload")}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ limit 10 [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_LIMIT |PARTITIONED|
+ project ([$$20]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$20] <- [$$o.getField("v")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$o]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$21, $$o] <- test.ColumnDataset condition (eq($$o.getField("v").getField("type"), "WeMo")) limit 10 project ({v:{payload:any,type:any}}) filter on: eq($$o.getField("v").getField("type"), "WeMo") range-filter on: eq($$o.getField("v").getField("type"), "WeMo") [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.024.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.024.plan
new file mode 100644
index 0000000..cc4aea0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.024.plan
@@ -0,0 +1,38 @@
+distribute result [$$31] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$31]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$31] <- [{"$1": get-item(get-item($$36, 0), 0), "$2": get-item($$37, 1), "$3": get-item(get-item($$38, 1), 1)}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$36, $$37, $$38]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- SORT_MERGE_EXCHANGE [$$35(ASC) ] |PARTITIONED|
+ order (ASC, $$35) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STABLE_SORT [$$35(ASC)] |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$36, $$37, $$38, $$35]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$38, $$37] <- [$$49.getField("f2"), $$49.getField("f3")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$35, $$49, $$36]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$49, $$36] <- [get-item($$33, 1), get-item($$33, 0).getField("f2")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$33, $$35]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$33, $$35] <- [$$c.getField("f1"), $$c.getField("x")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$c]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$34, $$c] <- test.ColumnDataset project ({x:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.025.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.025.plan
new file mode 100644
index 0000000..830e096
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.025.plan
@@ -0,0 +1,22 @@
+distribute result [$$32] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$32]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$32] <- [{"$1": get-item(get-item(get-item($$33, 0).getField("f2"), 0), 0), "$2": get-item($$49.getField("f3"), 1), "$3": get-item(get-item($$49.getField("f2"), 1), 1), "x": $$c.getField("x")}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$49] <- [get-item($$33, 1)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$33] <- [$$c.getField("f1")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$c]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$34, $$c] <- test.ColumnDataset project ({x:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.026.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.026.plan
new file mode 100644
index 0000000..b65bd37
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.026.plan
@@ -0,0 +1,38 @@
+distribute result [$$32] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$32]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$32] <- [{"$1": get-item(get-item($$37, 0), 0), "$2": get-item($$38, 1), "$3": get-item(get-item($$39, 1), 1), "x": $$40}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$37, $$38, $$39, $$40]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- SORT_MERGE_EXCHANGE [$$36(ASC) ] |PARTITIONED|
+ order (ASC, $$36) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STABLE_SORT [$$36(ASC)] |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$37, $$38, $$39, $$40, $$36]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$39, $$38] <- [$$51.getField("f2"), $$51.getField("f3")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$36, $$40, $$51, $$37]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$51, $$37] <- [get-item($$34, 1), get-item($$34, 0).getField("f2")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$34, $$36, $$40]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$34, $$36, $$40] <- [$$c.getField("f1"), $$c.getField("y"), $$c.getField("x")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$c]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$35, $$c] <- test.ColumnDataset project ({x:any,y:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.027.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.027.plan
new file mode 100644
index 0000000..64d7359
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/pushdown/other-pushdowns/other-pushdowns.027.plan
@@ -0,0 +1,26 @@
+distribute result [$$35] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$35]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$35] <- [{"$1": get-item(get-item(get-item($$36, 0).getField("f2"), 0), 0), "$2": get-item($$43, 1), "$3": get-item(get-item($$55.getField("f2"), 1), 1), "f4": $$43.getField("f4")}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$43] <- [$$55.getField("f3")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$55] <- [get-item($$36, 1)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$36]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$36] <- [$$c.getField("f1")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$c]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$37, $$c] <- test.ColumnDataset project ({f1:[{f2:[[any]],f3:<[any],{f4:any}>}]}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/upsert/003/003.003.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/upsert/003/003.003.regexadm
new file mode 100644
index 0000000..64695de
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/upsert/003/003.003.regexadm
@@ -0,0 +1 @@
+\Q{"keys":"id","type":{"type":"org.apache.asterix.om.types.ARecordType","name":"AnyObject","open":true,"fields":[]},"splits":[\E.*\Q]}\E
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/upsert/003/003.004.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/upsert/003/003.004.adm
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/upsert/003/003.004.adm
@@ -0,0 +1 @@
+1000
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.12.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.12.plan
new file mode 100644
index 0000000..8b117a9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.12.plan
@@ -0,0 +1,36 @@
+distribute result [$$31] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$31]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$31] <- [{"$1": get-item(get-item($$35, 0), 0), "$2": get-item($$36, 1), "$3": get-item(get-item($$37, 1), 1)}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$35, $$36, $$37]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- SORT_MERGE_EXCHANGE [$$34(ASC) ] |PARTITIONED|
+ order (ASC, $$34) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STABLE_SORT [$$34(ASC)] |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$35, $$36, $$37, $$34]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$37, $$36] <- [$$48.getField("f2"), $$48.getField("f3")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$34, $$48, $$35]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$48, $$35] <- [get-item($$33, 1), get-item($$33, 0).getField("f2")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$33, $$34]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$33, $$34] <- [$$p.getField("f1"), $$p.getField("x")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$p] <- test.ParquetDataset1 project ({x:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.13.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.13.plan
new file mode 100644
index 0000000..3266da3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.13.plan
@@ -0,0 +1,20 @@
+distribute result [$$32] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$32]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$32] <- [{"$1": get-item(get-item(get-item($$33, 0).getField("f2"), 0), 0), "$2": get-item($$48.getField("f3"), 1), "$3": get-item(get-item($$48.getField("f2"), 1), 1), "x": $$p.getField("x")}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$48] <- [get-item($$33, 1)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$33] <- [$$p.getField("f1")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$p] <- test.ParquetDataset1 project ({x:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.14.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.14.plan
new file mode 100644
index 0000000..2b10297
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.14.plan
@@ -0,0 +1,36 @@
+distribute result [$$32] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$32]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$32] <- [{"$1": get-item(get-item($$36, 0), 0), "$2": get-item($$37, 1), "$3": get-item(get-item($$38, 1), 1), "x": $$39}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$36, $$37, $$38, $$39]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- SORT_MERGE_EXCHANGE [$$35(ASC) ] |PARTITIONED|
+ order (ASC, $$35) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STABLE_SORT [$$35(ASC)] |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$36, $$37, $$38, $$39, $$35]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$38, $$37] <- [$$50.getField("f2"), $$50.getField("f3")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$35, $$39, $$50, $$36]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$50, $$36] <- [get-item($$34, 1), get-item($$34, 0).getField("f2")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$34, $$35, $$39]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$34, $$35, $$39] <- [$$p.getField("f1"), $$p.getField("y"), $$p.getField("x")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$p] <- test.ParquetDataset1 project ({x:any,y:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.15.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.15.plan
new file mode 100644
index 0000000..c575b1b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/external-dataset/common/parquet/pushdown-plans/pushdown-plans.15.plan
@@ -0,0 +1,24 @@
+distribute result [$$35] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$35]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$35] <- [{"$1": get-item(get-item(get-item($$36, 0).getField("f2"), 0), 0), "$2": get-item($$42, 1), "$3": get-item(get-item($$54.getField("f2"), 1), 1), "f4": $$42.getField("f4")}] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$42] <- [$$54.getField("f3")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$54] <- [get-item($$36, 1)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$36]) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$36] <- [$$p.getField("f1")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$p] <- test.ParquetDataset1 project ({f1:[{f2:[[any]],f3:<[any],{f4:any}>}]}) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.03.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.03.regexadm
index bd85d0e..5c091b4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.03.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.03.regexadm
@@ -3,21 +3,7 @@
\s*\Q"signature": {\E
\s*\Q"*": "*"\E
\s*\Q},\E
-\s*\Q"results": [ { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q]\E
+\s*\Q"results": [ {"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null} ]\E
\s*\Q,\E
\s*\Q"plans":{},\E
\s*\Q"warnings": [{\E\s*
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.04.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.04.regexadm
index dce84fe..a0d6601 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.04.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.04.regexadm
@@ -3,21 +3,7 @@
\s*\Q"signature": {\E
\s*\Q"*": "*"\E
\s*\Q},\E
-\s*\Q"results": [ { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q]\E
+\s*\Q"results": [ {"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null} ]\E
\s*\Q,\E
\s*\Q"plans":{},\E
\s*\Q"status": "success",\E
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.05.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.05.regexadm
index 6b1931a..ac945a7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.05.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.05.regexadm
@@ -3,21 +3,7 @@
\s*\Q"signature": {\E
\s*\Q"*": "*"\E
\s*\Q},\E
-\s*\Q"results": [ { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q]\E
+\s*\Q"results": [ {"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null} ]\E
\s*\Q,\E
\s*\Q"plans":{},\E
\s*\Q"status": "success",\E
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.07.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.07.regexadm
index 6b1931a..ac945a7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.07.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.07.regexadm
@@ -3,21 +3,7 @@
\s*\Q"signature": {\E
\s*\Q"*": "*"\E
\s*\Q},\E
-\s*\Q"results": [ { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q]\E
+\s*\Q"results": [ {"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null} ]\E
\s*\Q,\E
\s*\Q"plans":{},\E
\s*\Q"status": "success",\E
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.08.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.08.regexadm
index bd85d0e..5c091b4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.08.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/warnings/warnings-limit/warnings-limit.08.regexadm
@@ -3,21 +3,7 @@
\s*\Q"signature": {\E
\s*\Q"*": "*"\E
\s*\Q},\E
-\s*\Q"results": [ { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": false }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q, { "F1": { "a": 1 }, "F2": null }\E
-\s*\Q]\E
+\s*\Q"results": [ {"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":false},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null},{"F1":{"a":1},"F2":null} ]\E
\s*\Q,\E
\s*\Q"plans":{},\E
\s*\Q"warnings": [{\E\s*
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.022.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.022.plan
new file mode 100644
index 0000000..9997dae
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.022.plan
@@ -0,0 +1,68 @@
+distribute result [$$84] [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+-- DISTRIBUTE_RESULT |UNPARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |UNPARTITIONED|
+ limit 5 [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_LIMIT |UNPARTITIONED|
+ project ([$$84]) [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$84] <- [{"name": $$93, "phone": $$94, "num_reviews": sql-count($$91), "overall_avg": $#2, "overall_reviews": $$83}] [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- SORT_MERGE_EXCHANGE [$#2(DESC) ] |PARTITIONED|
+ limit 5 [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_LIMIT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ order (topK: 5) (DESC, $#2) [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STABLE_SORT [topK: 5] [$#2(DESC)] |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ subplan {
+ aggregate [$$83] <- [listify($$82)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- AGGREGATE |LOCAL|
+ assign [$$82] <- [$$98.getField("Overall")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |LOCAL|
+ assign [$$98] <- [$$reviews.getField("ratings")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |LOCAL|
+ unnest $$reviews <- scan-collection($$91) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- UNNEST |LOCAL|
+ nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- NESTED_TUPLE_SOURCE |LOCAL|
+ } [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- SUBPLAN |PARTITIONED|
+ project ([$$93, $$94, $$91, $#2]) [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$#2] <- [get-item($$72, 0)] [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ subplan {
+ aggregate [$$72] <- [listify($$86)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- AGGREGATE |LOCAL|
+ aggregate [$$86] <- [agg-sql-min($$69)] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- AGGREGATE |LOCAL|
+ assign [$$69] <- [$$97.getField("Overall")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |LOCAL|
+ assign [$$97] <- [$$89.getField("ratings")] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ASSIGN |LOCAL|
+ unnest $$89 <- scan-collection($$91) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- UNNEST |LOCAL|
+ nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- NESTED_TUPLE_SOURCE |LOCAL|
+ } [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- SUBPLAN |PARTITIONED|
+ project ([$$93, $$94, $$91]) [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ select (eq($$ht.getField("city"), "Los Angeles")) [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_SELECT |PARTITIONED|
+ assign [$$94, $$91, $$93] <- [$$ht.getField("phone"), $$ht.getField("reviews"), $$ht.getField("name")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$ht]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$85, $$ht] <- test.ColumnDataset project ({reviews:[{ratings:{Overall:any}}],phone:any,city:any,name:any}) filter on: eq($$ht.getField("city"), "Los Angeles") range-filter on: eq($$ht.getField("city"), "Los Angeles") [cardinality: 2.0, op-cost: 2.0, total-cost: 2.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.023.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.023.plan
new file mode 100644
index 0000000..f685929
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.023.plan
@@ -0,0 +1,28 @@
+distribute result [$$19] [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+-- DISTRIBUTE_RESULT |UNPARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |UNPARTITIONED|
+ limit 10 [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_LIMIT |UNPARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- RANDOM_MERGE_EXCHANGE |PARTITIONED|
+ project ([$$19]) [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$19] <- [{"payload": $$20.getField("payload")}] [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ limit 10 [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_LIMIT |PARTITIONED|
+ project ([$$20]) [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$20] <- [$$o.getField("v")] [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$o]) [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$21, $$o] <- test.ColumnDataset condition (eq($$o.getField("v").getField("type"), "WeMo")) limit 10 project ({v:{payload:any,type:any}}) filter on: eq($$o.getField("v").getField("type"), "WeMo") range-filter on: eq($$o.getField("v").getField("type"), "WeMo") [cardinality: 0.0, op-cost: 2.0, total-cost: 2.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.024.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.024.plan
new file mode 100644
index 0000000..fde7f81
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.024.plan
@@ -0,0 +1,38 @@
+distribute result [$$31] [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$31]) [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$31] <- [{"$1": get-item(get-item($$36, 0), 0), "$2": get-item($$37, 1), "$3": get-item(get-item($$38, 1), 1)}] [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$36, $$37, $$38]) [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- SORT_MERGE_EXCHANGE [$$35(ASC) ] |PARTITIONED|
+ order (ASC, $$35) [cardinality: 2.0, op-cost: 2.0, total-cost: 4.0]
+ -- STABLE_SORT [$$35(ASC)] |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$36, $$37, $$38, $$35]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$38, $$37] <- [$$49.getField("f2"), $$49.getField("f3")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$35, $$49, $$36]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$49, $$36] <- [get-item($$33, 1), get-item($$33, 0).getField("f2")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$33, $$35]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$33, $$35] <- [$$c.getField("f1"), $$c.getField("x")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$c]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$34, $$c] <- test.ColumnDataset project ({x:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 2.0, op-cost: 2.0, total-cost: 2.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.025.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.025.plan
new file mode 100644
index 0000000..deeb1eb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.025.plan
@@ -0,0 +1,22 @@
+distribute result [$$32] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$32]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$32] <- [{"$1": get-item(get-item(get-item($$33, 0).getField("f2"), 0), 0), "$2": get-item($$49.getField("f3"), 1), "$3": get-item(get-item($$49.getField("f2"), 1), 1), "x": $$c.getField("x")}] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$49] <- [get-item($$33, 1)] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$33] <- [$$c.getField("f1")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$c]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$34, $$c] <- test.ColumnDataset project ({x:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 2.0, op-cost: 2.0, total-cost: 2.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.026.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.026.plan
new file mode 100644
index 0000000..2379a5a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.026.plan
@@ -0,0 +1,38 @@
+distribute result [$$32] [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$32]) [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$32] <- [{"$1": get-item(get-item($$37, 0), 0), "$2": get-item($$38, 1), "$3": get-item(get-item($$39, 1), 1), "x": $$40}] [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$37, $$38, $$39, $$40]) [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 4.0]
+ -- SORT_MERGE_EXCHANGE [$$36(ASC) ] |PARTITIONED|
+ order (ASC, $$36) [cardinality: 2.0, op-cost: 2.0, total-cost: 4.0]
+ -- STABLE_SORT [$$36(ASC)] |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$37, $$38, $$39, $$40, $$36]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$39, $$38] <- [$$51.getField("f2"), $$51.getField("f3")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$36, $$40, $$51, $$37]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$51, $$37] <- [get-item($$34, 1), get-item($$34, 0).getField("f2")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$34, $$36, $$40]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$34, $$36, $$40] <- [$$c.getField("f1"), $$c.getField("y"), $$c.getField("x")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$c]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$35, $$c] <- test.ColumnDataset project ({x:any,y:any,f1:[{f2:[[any]],f3:[any]}]}) [cardinality: 2.0, op-cost: 2.0, total-cost: 2.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.027.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.027.plan
new file mode 100644
index 0000000..66b024a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_cbo/column/pushdown/other-pushdowns/other-pushdowns.027.plan
@@ -0,0 +1,26 @@
+distribute result [$$35] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+-- DISTRIBUTE_RESULT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ project ([$$35]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$35] <- [{"$1": get-item(get-item(get-item($$36, 0).getField("f2"), 0), 0), "$2": get-item($$43, 1), "$3": get-item(get-item($$55.getField("f2"), 1), 1), "f4": $$43.getField("f4")}] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$43] <- [$$55.getField("f3")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ assign [$$55] <- [get-item($$36, 1)] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$36]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ assign [$$36] <- [$$c.getField("f1")] [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ASSIGN |PARTITIONED|
+ project ([$$c]) [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- STREAM_PROJECT |PARTITIONED|
+ exchange [cardinality: 2.0, op-cost: 0.0, total-cost: 2.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ data-scan []<-[$$37, $$c] <- test.ColumnDataset project ({f1:[{f2:[[any]],f3:<[any],{f4:any}>}]}) [cardinality: 2.0, op-cost: 2.0, total-cost: 2.0]
+ -- DATASOURCE_SCAN |PARTITIONED|
+ exchange [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
+ empty-tuple-source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
+ -- EMPTY_TUPLE_SOURCE |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
index 5da18c3..6fb58ad 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
@@ -7486,6 +7486,11 @@
<output-dir compare="Text">query-ASTERIXDB-3419</output-dir>
</compilation-unit>
</test-case>
+ <test-case FilePath="misc">
+ <compilation-unit name="query-ASTERIXDB-3415">
+ <output-dir compare="Text">query-ASTERIXDB-3415</output-dir>
+ </compilation-unit>
+ </test-case>
</test-group>
<test-group name="multipart-dataverse">
<test-case FilePath="multipart-dataverse">
@@ -14399,7 +14404,7 @@
<test-case FilePath="meta">
<compilation-unit name="meta_after_gby">
<output-dir compare="Text">meta_after_gby</output-dir>
- <expected-error>Compilation error: Inappropriate use of function 'meta'. For example, after GROUP BY (in line 29, at column 21)</expected-error>
+ <expected-error>Compilation error: No source collection found for META(): collection not supported or cannot reference collection (in line 29, at column 21)</expected-error>
</compilation-unit>
</test-case>
<test-case FilePath="meta">
@@ -16513,6 +16518,11 @@
<output-dir compare="Text">upsert/002</output-dir>
</compilation-unit>
</test-case>
+ <test-case FilePath="column">
+ <compilation-unit name="upsert/003">
+ <output-dir compare="Text">upsert/003</output-dir>
+ </compilation-unit>
+ </test-case>
<test-case FilePath="column" check-warnings="true">
<compilation-unit name="filter/001">
<output-dir compare="Text">filter/001</output-dir>
@@ -16735,4 +16745,4 @@
</compilation-unit>
</test-case>
</test-group>
-</test-group>
\ No newline at end of file
+</test-group>
diff --git a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/aws/s3/S3CloudClient.java b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/aws/s3/S3CloudClient.java
index 24d5fa9..319b713 100644
--- a/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/aws/s3/S3CloudClient.java
+++ b/asterixdb/asterix-cloud/src/main/java/org/apache/asterix/cloud/clients/aws/s3/S3CloudClient.java
@@ -129,17 +129,22 @@
public int read(String bucket, String path, long offset, ByteBuffer buffer) throws HyracksDataException {
guardian.checkReadAccess(bucket, path);
profiler.objectGet();
+ long bytesToRead = buffer.remaining();
long readTo = offset + buffer.remaining() - 1;
GetObjectRequest rangeGetObjectRequest = GetObjectRequest.builder().range("bytes=" + offset + "-" + readTo)
.bucket(bucket).key(config.getPrefix() + path).build();
int totalRead = 0;
- int read = 0;
+ int read;
// TODO(htowaileb): add retry logic here
try (ResponseInputStream<GetObjectResponse> response = s3Client.getObject(rangeGetObjectRequest)) {
while (buffer.remaining() > 0) {
read = response.read(buffer.array(), buffer.position(), buffer.remaining());
+ if (read == -1) {
+ throw new IllegalStateException("Unexpected EOF encountered. File: " + path + ", expected bytes: "
+ + bytesToRead + ", bytes read: " + totalRead);
+ }
buffer.position(buffer.position() + read);
totalRead += read;
}
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/assembler/value/UUIDValueGetter.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/assembler/value/UUIDValueGetter.java
index 135ed85..408ccbb 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/assembler/value/UUIDValueGetter.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/assembler/value/UUIDValueGetter.java
@@ -19,12 +19,13 @@
package org.apache.asterix.column.assembler.value;
import org.apache.asterix.column.values.IColumnValuesReader;
+import org.apache.asterix.om.base.AUUID;
import org.apache.asterix.om.types.ATypeTag;
import org.apache.hyracks.data.std.api.IValueReference;
class UUIDValueGetter extends AbstractFixedLengthValueGetter {
UUIDValueGetter() {
- super(ATypeTag.UUID, 16);
+ super(ATypeTag.UUID, AUUID.UUID_BYTES);
}
@Override
@@ -34,4 +35,4 @@
uuid.getLength());
return value;
}
-}
\ No newline at end of file
+}
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/merge/MergeColumnTupleWriter.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/merge/MergeColumnTupleWriter.java
index 5912a3b..6ff2cd9 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/merge/MergeColumnTupleWriter.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/merge/MergeColumnTupleWriter.java
@@ -192,21 +192,23 @@
columnReader.write(columnWriter, count);
} catch (ColumnarValueException e) {
ObjectNode node = e.createNode(getClass().getSimpleName());
- node.put("numberOfWrittenPrimaryKeys", primaryKeyWriters[0].getCount());
- node.put("writtenComponents", writtenComponents.toString());
+ appendExceptionCommonInfo(node, componentIndex, count);
node.put("blockIndex", blockIndex);
- node.put("componentIndex", componentIndex);
- node.put("count", count);
- node.put("numberOFAntiMatters", numberOfAntiMatter);
throw e;
}
}
private void skipReaders(int componentIndex, int count) throws HyracksDataException {
MergeColumnTupleReference componentTuple = componentsTuples[componentIndex];
- for (int j = columnMetadata.getNumberOfPrimaryKeys(); j < columnMetadata.getNumberOfColumns(); j++) {
- IColumnValuesReader columnReader = componentTuple.getReader(j);
- columnReader.skip(count);
+ try {
+ for (int j = columnMetadata.getNumberOfPrimaryKeys(); j < columnMetadata.getNumberOfColumns(); j++) {
+ IColumnValuesReader columnReader = componentTuple.getReader(j);
+ columnReader.skip(count);
+ }
+ } catch (ColumnarValueException e) {
+ ObjectNode node = e.createNode(getClass().getSimpleName());
+ appendExceptionCommonInfo(node, componentIndex, count);
+ throw e;
}
}
@@ -241,4 +243,12 @@
}
return Math.min(maxNumberOfTuples, numberOfTuplesUsingMaxSize);
}
+
+ private void appendExceptionCommonInfo(ObjectNode node, int componentIndex, int count) {
+ node.put("numberOfWrittenPrimaryKeys", primaryKeyWriters[0].getCount());
+ node.put("writtenComponents", writtenComponents.toString());
+ node.put("numberOFAntiMatters", numberOfAntiMatter);
+ node.put("componentIndex", componentIndex);
+ node.put("count", count);
+ }
}
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/RepeatedPrimitiveColumnValuesReader.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/RepeatedPrimitiveColumnValuesReader.java
index 4f9fdec..3f90a4b 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/RepeatedPrimitiveColumnValuesReader.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/RepeatedPrimitiveColumnValuesReader.java
@@ -18,7 +18,6 @@
*/
package org.apache.asterix.column.values.reader;
-import java.io.IOException;
import java.util.Arrays;
import org.apache.asterix.column.values.IColumnValuesWriter;
@@ -96,23 +95,15 @@
@Override
public void write(IColumnValuesWriter writer, boolean callNext) throws HyracksDataException {
//We always call next as repeated values cannot be primary keys
- if (!next()) {
- ColumnarValueException e = new ColumnarValueException();
- appendReaderInformation(e.createNode(getClass().getSimpleName()));
- throw e;
- }
+ doNextAndCheck();
if (isRepeatedValue()) {
while (!isLastDelimiter()) {
writer.writeLevel(level);
if (isValue()) {
- try {
- writer.writeValue(this);
- } catch (IOException e) {
- throw HyracksDataException.create(e);
- }
+ writer.writeValue(this);
}
- next();
+ doNextAndCheck();
}
}
//Add last delimiter, or NULL/MISSING
@@ -132,10 +123,10 @@
@Override
public void skip(int count) throws HyracksDataException {
for (int i = 0; i < count; i++) {
- next();
+ doNextAndCheck();
if (isRepeatedValue()) {
while (!isLastDelimiter()) {
- next();
+ doNextAndCheck();
}
}
}
@@ -162,4 +153,12 @@
node.put("delimiterIndex", delimiterIndex);
node.put("isDelimiter", isDelimiter());
}
+
+ private void doNextAndCheck() throws HyracksDataException {
+ if (!next()) {
+ ColumnarValueException e = new ColumnarValueException();
+ appendReaderInformation(e.createNode(getClass().getSimpleName()));
+ throw e;
+ }
+ }
}
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/UUIDValueReader.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/UUIDValueReader.java
index 7517960..a029d6f 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/UUIDValueReader.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/reader/value/UUIDValueReader.java
@@ -23,6 +23,7 @@
import org.apache.asterix.column.bytes.decoder.ParquetPlainFixedLengthValuesReader;
import org.apache.asterix.column.bytes.stream.in.AbstractBytesInputStream;
import org.apache.asterix.dataflow.data.nontagged.comparators.AUUIDPartialBinaryComparatorFactory;
+import org.apache.asterix.om.base.AUUID;
import org.apache.asterix.om.types.ATypeTag;
import org.apache.hyracks.data.std.api.IValueReference;
import org.apache.hyracks.data.std.util.ArrayBackedValueStorage;
@@ -32,7 +33,8 @@
private IValueReference nextValue;
public UUIDValueReader() {
- ArrayBackedValueStorage storage = new ArrayBackedValueStorage(16);
+ ArrayBackedValueStorage storage = new ArrayBackedValueStorage(AUUID.UUID_BYTES);
+ storage.setSize(AUUID.UUID_BYTES);
uuidReader = new ParquetPlainFixedLengthValuesReader(storage);
}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/000-arrayOfInt.json b/asterixdb/asterix-column/src/test/resources/result/assembler/000-arrayOfInt.json
index 0ef2261..e8743b9 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/000-arrayOfInt.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/000-arrayOfInt.json
@@ -1,10 +1,10 @@
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/001-arrayObject.json b/asterixdb/asterix-column/src/test/resources/result/assembler/001-arrayObject.json
index 8857afc..4bfed37 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/001-arrayObject.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/001-arrayObject.json
@@ -1 +1 @@
-{ "a": [ { "b": 1 }, { "b": 2 }, { "c": 3 } ] }
+{"a":[{"b":1},{"b":2},{"c":3}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/002-arrayObject2.json b/asterixdb/asterix-column/src/test/resources/result/assembler/002-arrayObject2.json
index 9eb300f..656e0b5 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/002-arrayObject2.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/002-arrayObject2.json
@@ -1,4 +1,4 @@
-{ "ommhom": [ { "a": [ { "x": 1, "y": 2 }, { "y": 2 }, { "x": 1 } ], "b": 1, "c": 2, "d": 3 } ] }
-{ "ommhom": [ { "a": [ { "x": 1, "y": 2 }, { "y": 2 }, { "x": 1 } ], "b": 1, "c": 2, "d": 3 } ] }
-{ "ommhom": [ { "a": [ { "x": 1, "y": 2 }, { "y": 2 }, { "x": 1 } ], "b": 1, "c": 2, "d": 3 }, { "f": 3 }, { "k": { "v": { "t": 1 } } }, { "a": [ { "j": 1 } ] } ] }
-{ "ommhom": [ { "xyz": [ { "x": 1, "y": 2 }, { "y": 2 }, { "x": 1 } ] } ] }
+{"ommhom":[{"a":[{"x":1,"y":2},{"y":2},{"x":1}],"b":1,"c":2,"d":3}]}
+{"ommhom":[{"a":[{"x":1,"y":2},{"y":2},{"x":1}],"b":1,"c":2,"d":3}]}
+{"ommhom":[{"a":[{"x":1,"y":2},{"y":2},{"x":1}],"b":1,"c":2,"d":3},{"f":3},{"k":{"v":{"t":1}}},{"a":[{"j":1}]}]}
+{"ommhom":[{"xyz":[{"x":1,"y":2},{"y":2},{"x":1}]}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/003-arrayEmpty.json b/asterixdb/asterix-column/src/test/resources/result/assembler/003-arrayEmpty.json
index 3b8b6cc..77555c0 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/003-arrayEmpty.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/003-arrayEmpty.json
@@ -1,3 +1,3 @@
-{ "a": [ { "b": 1 }, { "b": 2 }, { "c": 3 } ] }
-{ "a": [ ] }
-{ "a": [ { "b": 1 }, { "b": 2 }, { "c": 3 } ] }
\ No newline at end of file
+{"a":[{"b":1},{"b":2},{"c":3}]}
+{"a":[]}
+{"a":[{"b":1},{"b":2},{"c":3}]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/100-addFields.json b/asterixdb/asterix-column/src/test/resources/result/assembler/100-addFields.json
index 1ce59bc..fb02498 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/100-addFields.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/100-addFields.json
@@ -1,4 +1,4 @@
-{ "a": 1 }
-{ "a": 1, "b": 2 }
-{ "a": 1, "c": 3 }
-{ "a": 1, "b": 2, "c": 3 }
+{"a":1}
+{"a":1,"b":2}
+{"a":1,"c":3}
+{"a":1,"b":2,"c":3}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/101-nestedAddFields.json b/asterixdb/asterix-column/src/test/resources/result/assembler/101-nestedAddFields.json
index f51e0df..2d796b3 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/101-nestedAddFields.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/101-nestedAddFields.json
@@ -1,4 +1,4 @@
-{ "a": { "b": { "c": 1 } } }
-{ "a": { "b": { "c": 1, "d": 2 }, "x": { "y": 2 } } }
-{ "a": { "b": { "c": 1 }, "x": { "z": 2 } } }
-{ "a": { "b": { "c": 1 } } }
\ No newline at end of file
+{"a":{"b":{"c":1}}}
+{"a":{"b":{"c":1,"d":2},"x":{"y":2}}}
+{"a":{"b":{"c":1},"x":{"z":2}}}
+{"a":{"b":{"c":1}}}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/200-unionPrimitive.json b/asterixdb/asterix-column/src/test/resources/result/assembler/200-unionPrimitive.json
index b8b6d23..6c81ed6 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/200-unionPrimitive.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/200-unionPrimitive.json
@@ -1,4 +1,4 @@
-{ "a": 1.25 }
-{ "a": 1 }
-{ "a": "test" }
-{ "a": 2.25 }
\ No newline at end of file
+{"a":1.25}
+{"a":1}
+{"a":"test"}
+{"a":2.25}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/201-unionPrimitiveObject.json b/asterixdb/asterix-column/src/test/resources/result/assembler/201-unionPrimitiveObject.json
index 249fee0..2555214 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/201-unionPrimitiveObject.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/201-unionPrimitiveObject.json
@@ -1,2 +1,2 @@
-{ "a": 1 }
-{ "a": { "b": 1 } }
+{"a":1}
+{"a":{"b":1}}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/202-unionPrimitiveArray.json b/asterixdb/asterix-column/src/test/resources/result/assembler/202-unionPrimitiveArray.json
index 6624e9b..e474bb4 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/202-unionPrimitiveArray.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/202-unionPrimitiveArray.json
@@ -1,4 +1,4 @@
-{ "a": 1 }
-{ "a": [ { "b": 1 }, { "b": 2 }, { "b": 3 } ] }
-{ "a": 1 }
-{ "a": [ { "b": 1, "c": 10 }, { "b": 2, "c": 11 }, { "b": 3, "c": 12 } ] }
+{"a":1}
+{"a":[{"b":1},{"b":2},{"b":3}]}
+{"a":1}
+{"a":[{"b":1,"c":10},{"b":2,"c":11},{"b":3,"c":12}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/203-unionNestedNested.json b/asterixdb/asterix-column/src/test/resources/result/assembler/203-unionNestedNested.json
index 5130db99..bf706be 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/203-unionNestedNested.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/203-unionNestedNested.json
@@ -1,4 +1,4 @@
-{ "a": { "b": 1 } }
-{ "a": [ { "b": 1 }, { "b": 2 }, { "b": 3 } ] }
-{ "a": { "b": 1 } }
-{ "a": [ { "b": 1, "c": 10 }, { "b": 2, "c": 11 }, { "b": 3, "c": 12 } ] }
+{"a":{"b":1}}
+{"a":[{"b":1},{"b":2},{"b":3}]}
+{"a":{"b":1}}
+{"a":[{"b":1,"c":10},{"b":2,"c":11},{"b":3,"c":12}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/204-unionArrayPrimitiveItems.json b/asterixdb/asterix-column/src/test/resources/result/assembler/204-unionArrayPrimitiveItems.json
index e468ab2..b74f4b1 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/204-unionArrayPrimitiveItems.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/204-unionArrayPrimitiveItems.json
@@ -1,5 +1,5 @@
-{ "a": [ 1 ] }
-{ "a": [ "1" ] }
-{ "a": [ false ] }
-{ "a": [ 1.25 ] }
-{ "a": [ 1, "1", false, 1.25 ] }
+{"a":[1]}
+{"a":["1"]}
+{"a":[false]}
+{"a":[1.25]}
+{"a":[1,"1",false,1.25]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/205-unionArrayPrimitiveObjectItems.json b/asterixdb/asterix-column/src/test/resources/result/assembler/205-unionArrayPrimitiveObjectItems.json
index 869a4e6..33327d2 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/205-unionArrayPrimitiveObjectItems.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/205-unionArrayPrimitiveObjectItems.json
@@ -1,5 +1,5 @@
-{ "a": [ 1 ] }
-{ "a": [ { "a": 1 } ] }
-{ "a": [ false ] }
-{ "a": [ { "b": 1 } ] }
-{ "a": [ 1, { "a": 1 }, false, { "b": 1 }, { "c": 1 } ] }
+{"a":[1]}
+{"a":[{"a":1}]}
+{"a":[false]}
+{"a":[{"b":1}]}
+{"a":[1,{"a":1},false,{"b":1},{"c":1}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/206-unionArrayPrimitiveObjectArrayItems.json b/asterixdb/asterix-column/src/test/resources/result/assembler/206-unionArrayPrimitiveObjectArrayItems.json
index 2a54e7f..557a9e8 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/206-unionArrayPrimitiveObjectArrayItems.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/206-unionArrayPrimitiveObjectArrayItems.json
@@ -1,5 +1,5 @@
-{ "a": [ 1 ] }
-{ "a": [ [ { "a": 1 } ] ] }
-{ "a": [ false ] }
-{ "a": [ { "b": 5 } ] }
-{ "a": [ 1, { "a": 5 }, false, [ { "b": 1 } ], [ { "c": 1 } ] ] }
+{"a":[1]}
+{"a":[[{"a":1}]]}
+{"a":[false]}
+{"a":[{"b":5}]}
+{"a":[1,{"a":5},false,[{"b":1}],[{"c":1}]]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/207-unionArrayNullItems0.json b/asterixdb/asterix-column/src/test/resources/result/assembler/207-unionArrayNullItems0.json
index f8faf4c..e929ee3 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/207-unionArrayNullItems0.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/207-unionArrayNullItems0.json
@@ -1,3 +1,3 @@
-{ "a": [ null ] }
-{ "a": [ 1 ] }
-{ "a": [ "string" ] }
\ No newline at end of file
+{"a":[null]}
+{"a":[1]}
+{"a":["string"]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/208-unionArrayNullItems1.json b/asterixdb/asterix-column/src/test/resources/result/assembler/208-unionArrayNullItems1.json
index eb3fc85..1e8b301 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/208-unionArrayNullItems1.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/208-unionArrayNullItems1.json
@@ -1,3 +1,3 @@
-{ "a": [ 1 ] }
-{ "a": [ null ] }
-{ "a": [ "string" ] }
\ No newline at end of file
+{"a":[1]}
+{"a":[null]}
+{"a":["string"]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/209-unionArrayNullItems2.json b/asterixdb/asterix-column/src/test/resources/result/assembler/209-unionArrayNullItems2.json
index da80268..c07b643 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/209-unionArrayNullItems2.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/209-unionArrayNullItems2.json
@@ -1,3 +1,3 @@
-{ "a": [ 0, "1", null ] }
-{ "a": [ 0, null, "1" ] }
-{ "a": [ null, 0, "1" ] }
\ No newline at end of file
+{"a":[0,"1",null]}
+{"a":[0,null,"1"]}
+{"a":[null,0,"1"]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/210-unionArrayNullItems3.json b/asterixdb/asterix-column/src/test/resources/result/assembler/210-unionArrayNullItems3.json
index 00fd767..8a5848a 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/210-unionArrayNullItems3.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/210-unionArrayNullItems3.json
@@ -1 +1 @@
-{ "a": [ 0, null, "1" ] }
\ No newline at end of file
+{"a":[0,null,"1"]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/301-null-primitive.json b/asterixdb/asterix-column/src/test/resources/result/assembler/301-null-primitive.json
index aeb319a..57232a9 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/301-null-primitive.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/301-null-primitive.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": null }
-{ "a": null }
-{ "a": 1 }
+{"a":null}
+{"a":null}
+{"a":null}
+{"a":1}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/310-null-object0.json b/asterixdb/asterix-column/src/test/resources/result/assembler/310-null-object0.json
index b563190..2379cf0 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/310-null-object0.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/310-null-object0.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": null }
-{ "a": { "b": 1, "c": 5 } }
-{ "a": { "b": null, "c": null } }
+{"a":null}
+{"a":null}
+{"a":{"b":1,"c":5}}
+{"a":{"b":null,"c":null}}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/311-null-object1.json b/asterixdb/asterix-column/src/test/resources/result/assembler/311-null-object1.json
index ee4a6ce..9cd9b35 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/311-null-object1.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/311-null-object1.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": null }
-{ "a": { "b": null, "c": 5 } }
-{ "a": { "b": 1, "c": null } }
+{"a":null}
+{"a":null}
+{"a":{"b":null,"c":5}}
+{"a":{"b":1,"c":null}}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/312-null-object2.json b/asterixdb/asterix-column/src/test/resources/result/assembler/312-null-object2.json
index 0609637..9539007 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/312-null-object2.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/312-null-object2.json
@@ -1,4 +1,4 @@
-{ "a": { "b": 1, "c": null } }
-{ "a": { "b": null, "c": 5 } }
-{ "a": null }
-{ "a": null }
+{"a":{"b":1,"c":null}}
+{"a":{"b":null,"c":5}}
+{"a":null}
+{"a":null}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/313-null-object3.json b/asterixdb/asterix-column/src/test/resources/result/assembler/313-null-object3.json
index 9c54517..1be1683 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/313-null-object3.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/313-null-object3.json
@@ -1,4 +1,4 @@
-{ "a": { "b": null, "c": null } }
-{ "a": { "b": 1, "c": 5 } }
-{ "a": null }
-{ "a": null }
+{"a":{"b":null,"c":null}}
+{"a":{"b":1,"c":5}}
+{"a":null}
+{"a":null}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/320-null-array0.json b/asterixdb/asterix-column/src/test/resources/result/assembler/320-null-array0.json
index e1d6d6f..e4b6ae1 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/320-null-array0.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/320-null-array0.json
@@ -1,4 +1,4 @@
-{ "a": [ null ] }
-{ "a": null }
-{ "a": [ 1 ] }
-{ "a": [ 3, null, 4 ] }
+{"a":[null]}
+{"a":null}
+{"a":[1]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/321-null-array1.json b/asterixdb/asterix-column/src/test/resources/result/assembler/321-null-array1.json
index e1d6d6f..e4b6ae1 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/321-null-array1.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/321-null-array1.json
@@ -1,4 +1,4 @@
-{ "a": [ null ] }
-{ "a": null }
-{ "a": [ 1 ] }
-{ "a": [ 3, null, 4 ] }
+{"a":[null]}
+{"a":null}
+{"a":[1]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/322-null-array2.json b/asterixdb/asterix-column/src/test/resources/result/assembler/322-null-array2.json
index 83f9f0c..8ca1c4f 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/322-null-array2.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/322-null-array2.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": [ null ] }
-{ "a": [ 1 ] }
-{ "a": [ 3, null, 4 ] }
+{"a":null}
+{"a":[null]}
+{"a":[1]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/323-null-array3.json b/asterixdb/asterix-column/src/test/resources/result/assembler/323-null-array3.json
index f53eae0..ecf07bc 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/323-null-array3.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/323-null-array3.json
@@ -1,4 +1,4 @@
-{ "a": [ null, 1, null ] }
-{ "a": [ null ] }
-{ "a": [ null, null ] }
-{ "a": [ 3, null, 4 ] }
+{"a":[null,1,null]}
+{"a":[null]}
+{"a":[null,null]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/324-null-array4.json b/asterixdb/asterix-column/src/test/resources/result/assembler/324-null-array4.json
index d12be57..e94fb68 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/324-null-array4.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/324-null-array4.json
@@ -1,4 +1,4 @@
-{ "a": [ 1 ] }
-{ "a": [ null ] }
-{ "a": [ null, null ] }
-{ "a": [ 3, null, 4 ] }
+{"a":[1]}
+{"a":[null]}
+{"a":[null,null]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/325-null-array5.json b/asterixdb/asterix-column/src/test/resources/result/assembler/325-null-array5.json
index a0d9cbf..4e844d6 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/325-null-array5.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/325-null-array5.json
@@ -1,4 +1,4 @@
-{ "a": [ { "a": 1 } ] }
-{ "a": null }
-{ "a": [ null ] }
-{ "a": [ { "a": null, "b": 2 }, null, { "a": 3, "b": null } ] }
+{"a":[{"a":1}]}
+{"a":null}
+{"a":[null]}
+{"a":[{"a":null,"b":2},null,{"a":3,"b":null}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/326-null-array6.json b/asterixdb/asterix-column/src/test/resources/result/assembler/326-null-array6.json
index 5a37b18..33a810c 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/326-null-array6.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/326-null-array6.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": [ null ] }
-{ "a": [ { "a": 1 } ] }
-{ "a": [ { "a": null, "b": 2 }, null, { "a": 3, "b": null } ] }
+{"a":null}
+{"a":[null]}
+{"a":[{"a":1}]}
+{"a":[{"a":null,"b":2},null,{"a":3,"b":null}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/327-null-array7.json b/asterixdb/asterix-column/src/test/resources/result/assembler/327-null-array7.json
index f305582..d7d8ccd 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/327-null-array7.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/327-null-array7.json
@@ -1,4 +1,4 @@
-{ "a": [ { "b": 2, "c": null }, null, { "b": null, "c": 3 } ] }
-{ "a": null }
-{ "a": [ null ] }
-{ "a": [ { "c": 1 } ] }
+{"a":[{"b":2,"c":null},null,{"b":null,"c":3}]}
+{"a":null}
+{"a":[null]}
+{"a":[{"c":1}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/assembler/900-dummy-tweet.json b/asterixdb/asterix-column/src/test/resources/result/assembler/900-dummy-tweet.json
index 53f2518..9bdde86 100644
--- a/asterixdb/asterix-column/src/test/resources/result/assembler/900-dummy-tweet.json
+++ b/asterixdb/asterix-column/src/test/resources/result/assembler/900-dummy-tweet.json
@@ -1,2 +1,2 @@
-{ "coordinates": { "coordinates": [ 1.1 ], "type": "string" }, "created_at": "string", "entities": { "urls": [ { "display_url": "string", "expanded_url": "string", "indices": [ 1 ], "url": "string" } ], "user_mentions": [ { "id": 1, "id_str": "string", "indices": [ 1 ], "name": "string", "screen_name": "string" } ] }, "favorite_count": 1, "favorited": true, "filter_level": "string", "geo": { "coordinates": [ 1.1 ], "type": "string" }, "id": "0000000", "id_str": "string", "in_reply_to_screen_name": "string", "in_reply_to_status_id": 1, "in_reply_to_status_id_str": "string", "in_reply_to_user_id": 1, "in_reply_to_user_id_str": "string", "is_quote_status": true, "lang": "string", "place": { "bounding_box": { "coordinates": [ [ [ 1.1 ] ] ], "type": "string" }, "country": "string", "country_code": "string", "full_name": "string", "id": "string", "name": "string", "place_type": "string", "url": "string" }, "possibly_sensitive": true, "quoted_status": { "created_at": "string", "entities": { "user_mentions": [ { "id": 1, "id_str": "string", "indices": [ 1 ], "name": "string", "screen_name": "string" } ] }, "favorite_count": 1, "favorited": true, "filter_level": "string", "id": 1, "id_str": "string", "in_reply_to_screen_name": "string", "in_reply_to_status_id": 1, "in_reply_to_status_id_str": "string", "in_reply_to_user_id": 1, "in_reply_to_user_id_str": "string", "is_quote_status": true, "lang": "string", "retweet_count": 1, "retweeted": true, "source": "string", "text": "string", "truncated": true, "user": { "contributors_enabled": true, "created_at": "string", "default_profile": true, "default_profile_image": true, "description": "string", "favourites_count": 1, "followers_count": 1, "friends_count": 1, "geo_enabled": true, "id": 1, "id_str": "string", "is_translator": true, "lang": "string", "listed_count": 1, "name": "string", "profile_background_color": "string", "profile_background_image_url": "string", "profile_background_image_url_https": "string", "profile_background_tile": true, "profile_banner_url": "string", "profile_image_url": "string", "profile_image_url_https": "string", "profile_link_color": "string", "profile_sidebar_border_color": "string", "profile_sidebar_fill_color": "string", "profile_text_color": "string", "profile_use_background_image": true, "protected": true, "screen_name": "string", "statuses_count": 1, "verified": true } }, "quoted_status_id": 1, "quoted_status_id_str": "string", "retweet_count": 1, "retweeted": true, "source": "string", "text": "string", "timestamp_ms": "string", "truncated": true, "user": { "contributors_enabled": true, "created_at": "string", "default_profile": true, "default_profile_image": true, "description": "string", "favourites_count": 1, "followers_count": 1, "friends_count": 1, "geo_enabled": true, "id": 1, "id_str": "string", "is_translator": true, "lang": "string", "listed_count": 1, "location": "string", "name": "string", "profile_background_color": "string", "profile_background_image_url": "string", "profile_background_image_url_https": "string", "profile_background_tile": true, "profile_banner_url": "string", "profile_image_url": "string", "profile_image_url_https": "string", "profile_link_color": "string", "profile_sidebar_border_color": "string", "profile_sidebar_fill_color": "string", "profile_text_color": "string", "profile_use_background_image": true, "protected": true, "screen_name": "string", "statuses_count": 1, "time_zone": "string", "url": "string", "utc_offset": 1, "verified": true } }
-{ "coordinates": { "coordinates": [ 1.1 ], "type": "string" }, "created_at": "string", "favorite_count": 1, "favorited": true, "filter_level": "string", "geo": { "coordinates": [ 1.1 ], "type": "string" }, "id": "11111111111111111111", "id_str": "string", "in_reply_to_screen_name": "string", "in_reply_to_status_id": 1, "in_reply_to_status_id_str": "string", "in_reply_to_user_id": 1, "in_reply_to_user_id_str": "string", "is_quote_status": true, "lang": "string", "place": { "bounding_box": { "coordinates": [ [ [ 1.1 ] ] ], "type": "string" }, "country": "string", "country_code": "string", "full_name": "string", "id": "string", "name": "string", "place_type": "string", "url": "string" }, "possibly_sensitive": true, "quoted_status": { "created_at": "string", "entities": { "user_mentions": [ { "id": 1, "id_str": "string", "indices": [ 1 ], "name": "string", "screen_name": "string" } ] }, "favorite_count": 1, "favorited": true, "filter_level": "string", "id": 1, "id_str": "string", "in_reply_to_screen_name": "string", "in_reply_to_status_id": 1, "in_reply_to_status_id_str": "string", "in_reply_to_user_id": 1, "in_reply_to_user_id_str": "string", "is_quote_status": true, "lang": "string", "retweet_count": 1, "retweeted": true, "source": "string", "text": "string", "truncated": true, "user": { "contributors_enabled": true, "created_at": "string", "default_profile": true, "default_profile_image": true, "description": "string", "favourites_count": 1, "followers_count": 1, "friends_count": 1, "geo_enabled": true, "id": 1, "id_str": "string", "is_translator": true, "lang": "string", "listed_count": 1, "name": "string", "profile_background_color": "string", "profile_background_image_url": "string", "profile_background_image_url_https": "string", "profile_background_tile": true, "profile_banner_url": "string", "profile_image_url": "string", "profile_image_url_https": "string", "profile_link_color": "string", "profile_sidebar_border_color": "string", "profile_sidebar_fill_color": "string", "profile_text_color": "string", "profile_use_background_image": true, "protected": true, "screen_name": "string", "statuses_count": 1, "verified": true } }, "quoted_status_id": 1, "quoted_status_id_str": "string", "retweet_count": 1, "retweeted": true, "source": "string", "text": "string", "timestamp_ms": "string", "truncated": true, "user": { "contributors_enabled": true, "created_at": "string", "default_profile": true, "default_profile_image": true, "description": "string", "favourites_count": 1, "followers_count": 1, "friends_count": 1, "geo_enabled": true, "id": 1, "id_str": "string", "is_translator": true, "lang": "string", "listed_count": 1, "location": "string", "name": "string", "profile_background_color": "string", "profile_background_image_url": "string", "profile_background_image_url_https": "string", "profile_background_tile": true, "profile_banner_url": "string", "profile_image_url": "string", "profile_image_url_https": "string", "profile_link_color": "string", "profile_sidebar_border_color": "string", "profile_sidebar_fill_color": "string", "profile_text_color": "string", "profile_use_background_image": true, "protected": true, "screen_name": "string", "statuses_count": 1, "time_zone": "string", "url": "string", "utc_offset": 1, "verified": true } }
+{"coordinates":{"coordinates":[1.1],"type":"string"},"created_at":"string","entities":{"urls":[{"display_url":"string","expanded_url":"string","indices":[1],"url":"string"}],"user_mentions":[{"id":1,"id_str":"string","indices":[1],"name":"string","screen_name":"string"}]},"favorite_count":1,"favorited":true,"filter_level":"string","geo":{"coordinates":[1.1],"type":"string"},"id":"0000000","id_str":"string","in_reply_to_screen_name":"string","in_reply_to_status_id":1,"in_reply_to_status_id_str":"string","in_reply_to_user_id":1,"in_reply_to_user_id_str":"string","is_quote_status":true,"lang":"string","place":{"bounding_box":{"coordinates":[[[1.1]]],"type":"string"},"country":"string","country_code":"string","full_name":"string","id":"string","name":"string","place_type":"string","url":"string"},"possibly_sensitive":true,"quoted_status":{"created_at":"string","entities":{"user_mentions":[{"id":1,"id_str":"string","indices":[1],"name":"string","screen_name":"string"}]},"favorite_count":1,"favorited":true,"filter_level":"string","id":1,"id_str":"string","in_reply_to_screen_name":"string","in_reply_to_status_id":1,"in_reply_to_status_id_str":"string","in_reply_to_user_id":1,"in_reply_to_user_id_str":"string","is_quote_status":true,"lang":"string","retweet_count":1,"retweeted":true,"source":"string","text":"string","truncated":true,"user":{"contributors_enabled":true,"created_at":"string","default_profile":true,"default_profile_image":true,"description":"string","favourites_count":1,"followers_count":1,"friends_count":1,"geo_enabled":true,"id":1,"id_str":"string","is_translator":true,"lang":"string","listed_count":1,"name":"string","profile_background_color":"string","profile_background_image_url":"string","profile_background_image_url_https":"string","profile_background_tile":true,"profile_banner_url":"string","profile_image_url":"string","profile_image_url_https":"string","profile_link_color":"string","profile_sidebar_border_color":"string","profile_sidebar_fill_color":"string","profile_text_color":"string","profile_use_background_image":true,"protected":true,"screen_name":"string","statuses_count":1,"verified":true}},"quoted_status_id":1,"quoted_status_id_str":"string","retweet_count":1,"retweeted":true,"source":"string","text":"string","timestamp_ms":"string","truncated":true,"user":{"contributors_enabled":true,"created_at":"string","default_profile":true,"default_profile_image":true,"description":"string","favourites_count":1,"followers_count":1,"friends_count":1,"geo_enabled":true,"id":1,"id_str":"string","is_translator":true,"lang":"string","listed_count":1,"location":"string","name":"string","profile_background_color":"string","profile_background_image_url":"string","profile_background_image_url_https":"string","profile_background_tile":true,"profile_banner_url":"string","profile_image_url":"string","profile_image_url_https":"string","profile_link_color":"string","profile_sidebar_border_color":"string","profile_sidebar_fill_color":"string","profile_text_color":"string","profile_use_background_image":true,"protected":true,"screen_name":"string","statuses_count":1,"time_zone":"string","url":"string","utc_offset":1,"verified":true}}
+{"coordinates":{"coordinates":[1.1],"type":"string"},"created_at":"string","favorite_count":1,"favorited":true,"filter_level":"string","geo":{"coordinates":[1.1],"type":"string"},"id":"11111111111111111111","id_str":"string","in_reply_to_screen_name":"string","in_reply_to_status_id":1,"in_reply_to_status_id_str":"string","in_reply_to_user_id":1,"in_reply_to_user_id_str":"string","is_quote_status":true,"lang":"string","place":{"bounding_box":{"coordinates":[[[1.1]]],"type":"string"},"country":"string","country_code":"string","full_name":"string","id":"string","name":"string","place_type":"string","url":"string"},"possibly_sensitive":true,"quoted_status":{"created_at":"string","entities":{"user_mentions":[{"id":1,"id_str":"string","indices":[1],"name":"string","screen_name":"string"}]},"favorite_count":1,"favorited":true,"filter_level":"string","id":1,"id_str":"string","in_reply_to_screen_name":"string","in_reply_to_status_id":1,"in_reply_to_status_id_str":"string","in_reply_to_user_id":1,"in_reply_to_user_id_str":"string","is_quote_status":true,"lang":"string","retweet_count":1,"retweeted":true,"source":"string","text":"string","truncated":true,"user":{"contributors_enabled":true,"created_at":"string","default_profile":true,"default_profile_image":true,"description":"string","favourites_count":1,"followers_count":1,"friends_count":1,"geo_enabled":true,"id":1,"id_str":"string","is_translator":true,"lang":"string","listed_count":1,"name":"string","profile_background_color":"string","profile_background_image_url":"string","profile_background_image_url_https":"string","profile_background_tile":true,"profile_banner_url":"string","profile_image_url":"string","profile_image_url_https":"string","profile_link_color":"string","profile_sidebar_border_color":"string","profile_sidebar_fill_color":"string","profile_text_color":"string","profile_use_background_image":true,"protected":true,"screen_name":"string","statuses_count":1,"verified":true}},"quoted_status_id":1,"quoted_status_id_str":"string","retweet_count":1,"retweeted":true,"source":"string","text":"string","timestamp_ms":"string","truncated":true,"user":{"contributors_enabled":true,"created_at":"string","default_profile":true,"default_profile_image":true,"description":"string","favourites_count":1,"followers_count":1,"friends_count":1,"geo_enabled":true,"id":1,"id_str":"string","is_translator":true,"lang":"string","listed_count":1,"location":"string","name":"string","profile_background_color":"string","profile_background_image_url":"string","profile_background_image_url_https":"string","profile_background_tile":true,"profile_banner_url":"string","profile_image_url":"string","profile_image_url_https":"string","profile_link_color":"string","profile_sidebar_border_color":"string","profile_sidebar_fill_color":"string","profile_text_color":"string","profile_use_background_image":true,"protected":true,"screen_name":"string","statuses_count":1,"time_zone":"string","url":"string","utc_offset":1,"verified":true}}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/000-arrayOfInt.json b/asterixdb/asterix-column/src/test/resources/result/small/000-arrayOfInt.json
index 0ef2261..e8743b9 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/000-arrayOfInt.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/000-arrayOfInt.json
@@ -1,10 +1,10 @@
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
-{ "b": [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] }
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
+{"b":[[1,2,3],[4,5,6]]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/001-arrayObject.json b/asterixdb/asterix-column/src/test/resources/result/small/001-arrayObject.json
index 8857afc..4bfed37 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/001-arrayObject.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/001-arrayObject.json
@@ -1 +1 @@
-{ "a": [ { "b": 1 }, { "b": 2 }, { "c": 3 } ] }
+{"a":[{"b":1},{"b":2},{"c":3}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/002-arrayObject2.json b/asterixdb/asterix-column/src/test/resources/result/small/002-arrayObject2.json
index 9eb300f..656e0b5 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/002-arrayObject2.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/002-arrayObject2.json
@@ -1,4 +1,4 @@
-{ "ommhom": [ { "a": [ { "x": 1, "y": 2 }, { "y": 2 }, { "x": 1 } ], "b": 1, "c": 2, "d": 3 } ] }
-{ "ommhom": [ { "a": [ { "x": 1, "y": 2 }, { "y": 2 }, { "x": 1 } ], "b": 1, "c": 2, "d": 3 } ] }
-{ "ommhom": [ { "a": [ { "x": 1, "y": 2 }, { "y": 2 }, { "x": 1 } ], "b": 1, "c": 2, "d": 3 }, { "f": 3 }, { "k": { "v": { "t": 1 } } }, { "a": [ { "j": 1 } ] } ] }
-{ "ommhom": [ { "xyz": [ { "x": 1, "y": 2 }, { "y": 2 }, { "x": 1 } ] } ] }
+{"ommhom":[{"a":[{"x":1,"y":2},{"y":2},{"x":1}],"b":1,"c":2,"d":3}]}
+{"ommhom":[{"a":[{"x":1,"y":2},{"y":2},{"x":1}],"b":1,"c":2,"d":3}]}
+{"ommhom":[{"a":[{"x":1,"y":2},{"y":2},{"x":1}],"b":1,"c":2,"d":3},{"f":3},{"k":{"v":{"t":1}}},{"a":[{"j":1}]}]}
+{"ommhom":[{"xyz":[{"x":1,"y":2},{"y":2},{"x":1}]}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/003-arrayEmpty.json b/asterixdb/asterix-column/src/test/resources/result/small/003-arrayEmpty.json
index 3b8b6cc..77555c0 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/003-arrayEmpty.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/003-arrayEmpty.json
@@ -1,3 +1,3 @@
-{ "a": [ { "b": 1 }, { "b": 2 }, { "c": 3 } ] }
-{ "a": [ ] }
-{ "a": [ { "b": 1 }, { "b": 2 }, { "c": 3 } ] }
\ No newline at end of file
+{"a":[{"b":1},{"b":2},{"c":3}]}
+{"a":[]}
+{"a":[{"b":1},{"b":2},{"c":3}]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/100-addFields.json b/asterixdb/asterix-column/src/test/resources/result/small/100-addFields.json
index 1ce59bc..fb02498 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/100-addFields.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/100-addFields.json
@@ -1,4 +1,4 @@
-{ "a": 1 }
-{ "a": 1, "b": 2 }
-{ "a": 1, "c": 3 }
-{ "a": 1, "b": 2, "c": 3 }
+{"a":1}
+{"a":1,"b":2}
+{"a":1,"c":3}
+{"a":1,"b":2,"c":3}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/101-nestedAddFields.json b/asterixdb/asterix-column/src/test/resources/result/small/101-nestedAddFields.json
index f51e0df..2d796b3 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/101-nestedAddFields.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/101-nestedAddFields.json
@@ -1,4 +1,4 @@
-{ "a": { "b": { "c": 1 } } }
-{ "a": { "b": { "c": 1, "d": 2 }, "x": { "y": 2 } } }
-{ "a": { "b": { "c": 1 }, "x": { "z": 2 } } }
-{ "a": { "b": { "c": 1 } } }
\ No newline at end of file
+{"a":{"b":{"c":1}}}
+{"a":{"b":{"c":1,"d":2},"x":{"y":2}}}
+{"a":{"b":{"c":1},"x":{"z":2}}}
+{"a":{"b":{"c":1}}}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/200-unionPrimitive.json b/asterixdb/asterix-column/src/test/resources/result/small/200-unionPrimitive.json
index 37d3d92..db61955 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/200-unionPrimitive.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/200-unionPrimitive.json
@@ -1,4 +1,4 @@
-{ "a": 1.25 }
-{ "a": 1 }
-{ "a": "test" }
-{ "a": 2.25 }
+{"a":1.25}
+{"a":1}
+{"a":"test"}
+{"a":2.25}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/201-unionPrimitiveObject.json b/asterixdb/asterix-column/src/test/resources/result/small/201-unionPrimitiveObject.json
index 249fee0..2555214 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/201-unionPrimitiveObject.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/201-unionPrimitiveObject.json
@@ -1,2 +1,2 @@
-{ "a": 1 }
-{ "a": { "b": 1 } }
+{"a":1}
+{"a":{"b":1}}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/202-unionPrimitiveArray.json b/asterixdb/asterix-column/src/test/resources/result/small/202-unionPrimitiveArray.json
index 6624e9b..e474bb4 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/202-unionPrimitiveArray.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/202-unionPrimitiveArray.json
@@ -1,4 +1,4 @@
-{ "a": 1 }
-{ "a": [ { "b": 1 }, { "b": 2 }, { "b": 3 } ] }
-{ "a": 1 }
-{ "a": [ { "b": 1, "c": 10 }, { "b": 2, "c": 11 }, { "b": 3, "c": 12 } ] }
+{"a":1}
+{"a":[{"b":1},{"b":2},{"b":3}]}
+{"a":1}
+{"a":[{"b":1,"c":10},{"b":2,"c":11},{"b":3,"c":12}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/203-unionNestedNested.json b/asterixdb/asterix-column/src/test/resources/result/small/203-unionNestedNested.json
index 5130db99..bf706be 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/203-unionNestedNested.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/203-unionNestedNested.json
@@ -1,4 +1,4 @@
-{ "a": { "b": 1 } }
-{ "a": [ { "b": 1 }, { "b": 2 }, { "b": 3 } ] }
-{ "a": { "b": 1 } }
-{ "a": [ { "b": 1, "c": 10 }, { "b": 2, "c": 11 }, { "b": 3, "c": 12 } ] }
+{"a":{"b":1}}
+{"a":[{"b":1},{"b":2},{"b":3}]}
+{"a":{"b":1}}
+{"a":[{"b":1,"c":10},{"b":2,"c":11},{"b":3,"c":12}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/204-unionArrayPrimitiveItems.json b/asterixdb/asterix-column/src/test/resources/result/small/204-unionArrayPrimitiveItems.json
index e468ab2..b74f4b1 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/204-unionArrayPrimitiveItems.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/204-unionArrayPrimitiveItems.json
@@ -1,5 +1,5 @@
-{ "a": [ 1 ] }
-{ "a": [ "1" ] }
-{ "a": [ false ] }
-{ "a": [ 1.25 ] }
-{ "a": [ 1, "1", false, 1.25 ] }
+{"a":[1]}
+{"a":["1"]}
+{"a":[false]}
+{"a":[1.25]}
+{"a":[1,"1",false,1.25]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/205-unionArrayPrimitiveObjectItems.json b/asterixdb/asterix-column/src/test/resources/result/small/205-unionArrayPrimitiveObjectItems.json
index 869a4e6..33327d2 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/205-unionArrayPrimitiveObjectItems.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/205-unionArrayPrimitiveObjectItems.json
@@ -1,5 +1,5 @@
-{ "a": [ 1 ] }
-{ "a": [ { "a": 1 } ] }
-{ "a": [ false ] }
-{ "a": [ { "b": 1 } ] }
-{ "a": [ 1, { "a": 1 }, false, { "b": 1 }, { "c": 1 } ] }
+{"a":[1]}
+{"a":[{"a":1}]}
+{"a":[false]}
+{"a":[{"b":1}]}
+{"a":[1,{"a":1},false,{"b":1},{"c":1}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/206-unionArrayPrimitiveObjectArrayItems.json b/asterixdb/asterix-column/src/test/resources/result/small/206-unionArrayPrimitiveObjectArrayItems.json
index 2a54e7f..557a9e8 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/206-unionArrayPrimitiveObjectArrayItems.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/206-unionArrayPrimitiveObjectArrayItems.json
@@ -1,5 +1,5 @@
-{ "a": [ 1 ] }
-{ "a": [ [ { "a": 1 } ] ] }
-{ "a": [ false ] }
-{ "a": [ { "b": 5 } ] }
-{ "a": [ 1, { "a": 5 }, false, [ { "b": 1 } ], [ { "c": 1 } ] ] }
+{"a":[1]}
+{"a":[[{"a":1}]]}
+{"a":[false]}
+{"a":[{"b":5}]}
+{"a":[1,{"a":5},false,[{"b":1}],[{"c":1}]]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/207-unionArrayNullItems0.json b/asterixdb/asterix-column/src/test/resources/result/small/207-unionArrayNullItems0.json
index f8faf4c..e929ee3 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/207-unionArrayNullItems0.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/207-unionArrayNullItems0.json
@@ -1,3 +1,3 @@
-{ "a": [ null ] }
-{ "a": [ 1 ] }
-{ "a": [ "string" ] }
\ No newline at end of file
+{"a":[null]}
+{"a":[1]}
+{"a":["string"]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/208-unionArrayNullItems1.json b/asterixdb/asterix-column/src/test/resources/result/small/208-unionArrayNullItems1.json
index eb3fc85..1e8b301 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/208-unionArrayNullItems1.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/208-unionArrayNullItems1.json
@@ -1,3 +1,3 @@
-{ "a": [ 1 ] }
-{ "a": [ null ] }
-{ "a": [ "string" ] }
\ No newline at end of file
+{"a":[1]}
+{"a":[null]}
+{"a":["string"]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/209-unionArrayNullItems2.json b/asterixdb/asterix-column/src/test/resources/result/small/209-unionArrayNullItems2.json
index da80268..c07b643 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/209-unionArrayNullItems2.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/209-unionArrayNullItems2.json
@@ -1,3 +1,3 @@
-{ "a": [ 0, "1", null ] }
-{ "a": [ 0, null, "1" ] }
-{ "a": [ null, 0, "1" ] }
\ No newline at end of file
+{"a":[0,"1",null]}
+{"a":[0,null,"1"]}
+{"a":[null,0,"1"]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/210-unionArrayNullItems3.json b/asterixdb/asterix-column/src/test/resources/result/small/210-unionArrayNullItems3.json
index 00fd767..8a5848a 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/210-unionArrayNullItems3.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/210-unionArrayNullItems3.json
@@ -1 +1 @@
-{ "a": [ 0, null, "1" ] }
\ No newline at end of file
+{"a":[0,null,"1"]}
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/301-null-primitive.json b/asterixdb/asterix-column/src/test/resources/result/small/301-null-primitive.json
index aeb319a..57232a9 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/301-null-primitive.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/301-null-primitive.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": null }
-{ "a": null }
-{ "a": 1 }
+{"a":null}
+{"a":null}
+{"a":null}
+{"a":1}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/310-null-object0.json b/asterixdb/asterix-column/src/test/resources/result/small/310-null-object0.json
index b563190..2379cf0 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/310-null-object0.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/310-null-object0.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": null }
-{ "a": { "b": 1, "c": 5 } }
-{ "a": { "b": null, "c": null } }
+{"a":null}
+{"a":null}
+{"a":{"b":1,"c":5}}
+{"a":{"b":null,"c":null}}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/311-null-object1.json b/asterixdb/asterix-column/src/test/resources/result/small/311-null-object1.json
index ee4a6ce..9cd9b35 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/311-null-object1.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/311-null-object1.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": null }
-{ "a": { "b": null, "c": 5 } }
-{ "a": { "b": 1, "c": null } }
+{"a":null}
+{"a":null}
+{"a":{"b":null,"c":5}}
+{"a":{"b":1,"c":null}}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/312-null-object2.json b/asterixdb/asterix-column/src/test/resources/result/small/312-null-object2.json
index 0609637..9539007 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/312-null-object2.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/312-null-object2.json
@@ -1,4 +1,4 @@
-{ "a": { "b": 1, "c": null } }
-{ "a": { "b": null, "c": 5 } }
-{ "a": null }
-{ "a": null }
+{"a":{"b":1,"c":null}}
+{"a":{"b":null,"c":5}}
+{"a":null}
+{"a":null}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/313-null-object3.json b/asterixdb/asterix-column/src/test/resources/result/small/313-null-object3.json
index 9c54517..1be1683 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/313-null-object3.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/313-null-object3.json
@@ -1,4 +1,4 @@
-{ "a": { "b": null, "c": null } }
-{ "a": { "b": 1, "c": 5 } }
-{ "a": null }
-{ "a": null }
+{"a":{"b":null,"c":null}}
+{"a":{"b":1,"c":5}}
+{"a":null}
+{"a":null}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/320-null-array0.json b/asterixdb/asterix-column/src/test/resources/result/small/320-null-array0.json
index e1d6d6f..e4b6ae1 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/320-null-array0.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/320-null-array0.json
@@ -1,4 +1,4 @@
-{ "a": [ null ] }
-{ "a": null }
-{ "a": [ 1 ] }
-{ "a": [ 3, null, 4 ] }
+{"a":[null]}
+{"a":null}
+{"a":[1]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/321-null-array1.json b/asterixdb/asterix-column/src/test/resources/result/small/321-null-array1.json
index e1d6d6f..e4b6ae1 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/321-null-array1.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/321-null-array1.json
@@ -1,4 +1,4 @@
-{ "a": [ null ] }
-{ "a": null }
-{ "a": [ 1 ] }
-{ "a": [ 3, null, 4 ] }
+{"a":[null]}
+{"a":null}
+{"a":[1]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/322-null-array2.json b/asterixdb/asterix-column/src/test/resources/result/small/322-null-array2.json
index 83f9f0c..8ca1c4f 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/322-null-array2.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/322-null-array2.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": [ null ] }
-{ "a": [ 1 ] }
-{ "a": [ 3, null, 4 ] }
+{"a":null}
+{"a":[null]}
+{"a":[1]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/323-null-array3.json b/asterixdb/asterix-column/src/test/resources/result/small/323-null-array3.json
index f53eae0..ecf07bc 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/323-null-array3.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/323-null-array3.json
@@ -1,4 +1,4 @@
-{ "a": [ null, 1, null ] }
-{ "a": [ null ] }
-{ "a": [ null, null ] }
-{ "a": [ 3, null, 4 ] }
+{"a":[null,1,null]}
+{"a":[null]}
+{"a":[null,null]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/324-null-array4.json b/asterixdb/asterix-column/src/test/resources/result/small/324-null-array4.json
index d12be57..e94fb68 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/324-null-array4.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/324-null-array4.json
@@ -1,4 +1,4 @@
-{ "a": [ 1 ] }
-{ "a": [ null ] }
-{ "a": [ null, null ] }
-{ "a": [ 3, null, 4 ] }
+{"a":[1]}
+{"a":[null]}
+{"a":[null,null]}
+{"a":[3,null,4]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/325-null-array5.json b/asterixdb/asterix-column/src/test/resources/result/small/325-null-array5.json
index a0d9cbf..4e844d6 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/325-null-array5.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/325-null-array5.json
@@ -1,4 +1,4 @@
-{ "a": [ { "a": 1 } ] }
-{ "a": null }
-{ "a": [ null ] }
-{ "a": [ { "a": null, "b": 2 }, null, { "a": 3, "b": null } ] }
+{"a":[{"a":1}]}
+{"a":null}
+{"a":[null]}
+{"a":[{"a":null,"b":2},null,{"a":3,"b":null}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/326-null-array6.json b/asterixdb/asterix-column/src/test/resources/result/small/326-null-array6.json
index 5a37b18..33a810c 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/326-null-array6.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/326-null-array6.json
@@ -1,4 +1,4 @@
-{ "a": null }
-{ "a": [ null ] }
-{ "a": [ { "a": 1 } ] }
-{ "a": [ { "a": null, "b": 2 }, null, { "a": 3, "b": null } ] }
+{"a":null}
+{"a":[null]}
+{"a":[{"a":1}]}
+{"a":[{"a":null,"b":2},null,{"a":3,"b":null}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/327-null-array7.json b/asterixdb/asterix-column/src/test/resources/result/small/327-null-array7.json
index f305582..d7d8ccd 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/327-null-array7.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/327-null-array7.json
@@ -1,4 +1,4 @@
-{ "a": [ { "b": 2, "c": null }, null, { "b": null, "c": 3 } ] }
-{ "a": null }
-{ "a": [ null ] }
-{ "a": [ { "c": 1 } ] }
+{"a":[{"b":2,"c":null},null,{"b":null,"c":3}]}
+{"a":null}
+{"a":[null]}
+{"a":[{"c":1}]}
diff --git a/asterixdb/asterix-column/src/test/resources/result/small/900-dummy-tweet.json b/asterixdb/asterix-column/src/test/resources/result/small/900-dummy-tweet.json
index 53f2518..9bdde86 100644
--- a/asterixdb/asterix-column/src/test/resources/result/small/900-dummy-tweet.json
+++ b/asterixdb/asterix-column/src/test/resources/result/small/900-dummy-tweet.json
@@ -1,2 +1,2 @@
-{ "coordinates": { "coordinates": [ 1.1 ], "type": "string" }, "created_at": "string", "entities": { "urls": [ { "display_url": "string", "expanded_url": "string", "indices": [ 1 ], "url": "string" } ], "user_mentions": [ { "id": 1, "id_str": "string", "indices": [ 1 ], "name": "string", "screen_name": "string" } ] }, "favorite_count": 1, "favorited": true, "filter_level": "string", "geo": { "coordinates": [ 1.1 ], "type": "string" }, "id": "0000000", "id_str": "string", "in_reply_to_screen_name": "string", "in_reply_to_status_id": 1, "in_reply_to_status_id_str": "string", "in_reply_to_user_id": 1, "in_reply_to_user_id_str": "string", "is_quote_status": true, "lang": "string", "place": { "bounding_box": { "coordinates": [ [ [ 1.1 ] ] ], "type": "string" }, "country": "string", "country_code": "string", "full_name": "string", "id": "string", "name": "string", "place_type": "string", "url": "string" }, "possibly_sensitive": true, "quoted_status": { "created_at": "string", "entities": { "user_mentions": [ { "id": 1, "id_str": "string", "indices": [ 1 ], "name": "string", "screen_name": "string" } ] }, "favorite_count": 1, "favorited": true, "filter_level": "string", "id": 1, "id_str": "string", "in_reply_to_screen_name": "string", "in_reply_to_status_id": 1, "in_reply_to_status_id_str": "string", "in_reply_to_user_id": 1, "in_reply_to_user_id_str": "string", "is_quote_status": true, "lang": "string", "retweet_count": 1, "retweeted": true, "source": "string", "text": "string", "truncated": true, "user": { "contributors_enabled": true, "created_at": "string", "default_profile": true, "default_profile_image": true, "description": "string", "favourites_count": 1, "followers_count": 1, "friends_count": 1, "geo_enabled": true, "id": 1, "id_str": "string", "is_translator": true, "lang": "string", "listed_count": 1, "name": "string", "profile_background_color": "string", "profile_background_image_url": "string", "profile_background_image_url_https": "string", "profile_background_tile": true, "profile_banner_url": "string", "profile_image_url": "string", "profile_image_url_https": "string", "profile_link_color": "string", "profile_sidebar_border_color": "string", "profile_sidebar_fill_color": "string", "profile_text_color": "string", "profile_use_background_image": true, "protected": true, "screen_name": "string", "statuses_count": 1, "verified": true } }, "quoted_status_id": 1, "quoted_status_id_str": "string", "retweet_count": 1, "retweeted": true, "source": "string", "text": "string", "timestamp_ms": "string", "truncated": true, "user": { "contributors_enabled": true, "created_at": "string", "default_profile": true, "default_profile_image": true, "description": "string", "favourites_count": 1, "followers_count": 1, "friends_count": 1, "geo_enabled": true, "id": 1, "id_str": "string", "is_translator": true, "lang": "string", "listed_count": 1, "location": "string", "name": "string", "profile_background_color": "string", "profile_background_image_url": "string", "profile_background_image_url_https": "string", "profile_background_tile": true, "profile_banner_url": "string", "profile_image_url": "string", "profile_image_url_https": "string", "profile_link_color": "string", "profile_sidebar_border_color": "string", "profile_sidebar_fill_color": "string", "profile_text_color": "string", "profile_use_background_image": true, "protected": true, "screen_name": "string", "statuses_count": 1, "time_zone": "string", "url": "string", "utc_offset": 1, "verified": true } }
-{ "coordinates": { "coordinates": [ 1.1 ], "type": "string" }, "created_at": "string", "favorite_count": 1, "favorited": true, "filter_level": "string", "geo": { "coordinates": [ 1.1 ], "type": "string" }, "id": "11111111111111111111", "id_str": "string", "in_reply_to_screen_name": "string", "in_reply_to_status_id": 1, "in_reply_to_status_id_str": "string", "in_reply_to_user_id": 1, "in_reply_to_user_id_str": "string", "is_quote_status": true, "lang": "string", "place": { "bounding_box": { "coordinates": [ [ [ 1.1 ] ] ], "type": "string" }, "country": "string", "country_code": "string", "full_name": "string", "id": "string", "name": "string", "place_type": "string", "url": "string" }, "possibly_sensitive": true, "quoted_status": { "created_at": "string", "entities": { "user_mentions": [ { "id": 1, "id_str": "string", "indices": [ 1 ], "name": "string", "screen_name": "string" } ] }, "favorite_count": 1, "favorited": true, "filter_level": "string", "id": 1, "id_str": "string", "in_reply_to_screen_name": "string", "in_reply_to_status_id": 1, "in_reply_to_status_id_str": "string", "in_reply_to_user_id": 1, "in_reply_to_user_id_str": "string", "is_quote_status": true, "lang": "string", "retweet_count": 1, "retweeted": true, "source": "string", "text": "string", "truncated": true, "user": { "contributors_enabled": true, "created_at": "string", "default_profile": true, "default_profile_image": true, "description": "string", "favourites_count": 1, "followers_count": 1, "friends_count": 1, "geo_enabled": true, "id": 1, "id_str": "string", "is_translator": true, "lang": "string", "listed_count": 1, "name": "string", "profile_background_color": "string", "profile_background_image_url": "string", "profile_background_image_url_https": "string", "profile_background_tile": true, "profile_banner_url": "string", "profile_image_url": "string", "profile_image_url_https": "string", "profile_link_color": "string", "profile_sidebar_border_color": "string", "profile_sidebar_fill_color": "string", "profile_text_color": "string", "profile_use_background_image": true, "protected": true, "screen_name": "string", "statuses_count": 1, "verified": true } }, "quoted_status_id": 1, "quoted_status_id_str": "string", "retweet_count": 1, "retweeted": true, "source": "string", "text": "string", "timestamp_ms": "string", "truncated": true, "user": { "contributors_enabled": true, "created_at": "string", "default_profile": true, "default_profile_image": true, "description": "string", "favourites_count": 1, "followers_count": 1, "friends_count": 1, "geo_enabled": true, "id": 1, "id_str": "string", "is_translator": true, "lang": "string", "listed_count": 1, "location": "string", "name": "string", "profile_background_color": "string", "profile_background_image_url": "string", "profile_background_image_url_https": "string", "profile_background_tile": true, "profile_banner_url": "string", "profile_image_url": "string", "profile_image_url_https": "string", "profile_link_color": "string", "profile_sidebar_border_color": "string", "profile_sidebar_fill_color": "string", "profile_text_color": "string", "profile_use_background_image": true, "protected": true, "screen_name": "string", "statuses_count": 1, "time_zone": "string", "url": "string", "utc_offset": 1, "verified": true } }
+{"coordinates":{"coordinates":[1.1],"type":"string"},"created_at":"string","entities":{"urls":[{"display_url":"string","expanded_url":"string","indices":[1],"url":"string"}],"user_mentions":[{"id":1,"id_str":"string","indices":[1],"name":"string","screen_name":"string"}]},"favorite_count":1,"favorited":true,"filter_level":"string","geo":{"coordinates":[1.1],"type":"string"},"id":"0000000","id_str":"string","in_reply_to_screen_name":"string","in_reply_to_status_id":1,"in_reply_to_status_id_str":"string","in_reply_to_user_id":1,"in_reply_to_user_id_str":"string","is_quote_status":true,"lang":"string","place":{"bounding_box":{"coordinates":[[[1.1]]],"type":"string"},"country":"string","country_code":"string","full_name":"string","id":"string","name":"string","place_type":"string","url":"string"},"possibly_sensitive":true,"quoted_status":{"created_at":"string","entities":{"user_mentions":[{"id":1,"id_str":"string","indices":[1],"name":"string","screen_name":"string"}]},"favorite_count":1,"favorited":true,"filter_level":"string","id":1,"id_str":"string","in_reply_to_screen_name":"string","in_reply_to_status_id":1,"in_reply_to_status_id_str":"string","in_reply_to_user_id":1,"in_reply_to_user_id_str":"string","is_quote_status":true,"lang":"string","retweet_count":1,"retweeted":true,"source":"string","text":"string","truncated":true,"user":{"contributors_enabled":true,"created_at":"string","default_profile":true,"default_profile_image":true,"description":"string","favourites_count":1,"followers_count":1,"friends_count":1,"geo_enabled":true,"id":1,"id_str":"string","is_translator":true,"lang":"string","listed_count":1,"name":"string","profile_background_color":"string","profile_background_image_url":"string","profile_background_image_url_https":"string","profile_background_tile":true,"profile_banner_url":"string","profile_image_url":"string","profile_image_url_https":"string","profile_link_color":"string","profile_sidebar_border_color":"string","profile_sidebar_fill_color":"string","profile_text_color":"string","profile_use_background_image":true,"protected":true,"screen_name":"string","statuses_count":1,"verified":true}},"quoted_status_id":1,"quoted_status_id_str":"string","retweet_count":1,"retweeted":true,"source":"string","text":"string","timestamp_ms":"string","truncated":true,"user":{"contributors_enabled":true,"created_at":"string","default_profile":true,"default_profile_image":true,"description":"string","favourites_count":1,"followers_count":1,"friends_count":1,"geo_enabled":true,"id":1,"id_str":"string","is_translator":true,"lang":"string","listed_count":1,"location":"string","name":"string","profile_background_color":"string","profile_background_image_url":"string","profile_background_image_url_https":"string","profile_background_tile":true,"profile_banner_url":"string","profile_image_url":"string","profile_image_url_https":"string","profile_link_color":"string","profile_sidebar_border_color":"string","profile_sidebar_fill_color":"string","profile_text_color":"string","profile_use_background_image":true,"protected":true,"screen_name":"string","statuses_count":1,"time_zone":"string","url":"string","utc_offset":1,"verified":true}}
+{"coordinates":{"coordinates":[1.1],"type":"string"},"created_at":"string","favorite_count":1,"favorited":true,"filter_level":"string","geo":{"coordinates":[1.1],"type":"string"},"id":"11111111111111111111","id_str":"string","in_reply_to_screen_name":"string","in_reply_to_status_id":1,"in_reply_to_status_id_str":"string","in_reply_to_user_id":1,"in_reply_to_user_id_str":"string","is_quote_status":true,"lang":"string","place":{"bounding_box":{"coordinates":[[[1.1]]],"type":"string"},"country":"string","country_code":"string","full_name":"string","id":"string","name":"string","place_type":"string","url":"string"},"possibly_sensitive":true,"quoted_status":{"created_at":"string","entities":{"user_mentions":[{"id":1,"id_str":"string","indices":[1],"name":"string","screen_name":"string"}]},"favorite_count":1,"favorited":true,"filter_level":"string","id":1,"id_str":"string","in_reply_to_screen_name":"string","in_reply_to_status_id":1,"in_reply_to_status_id_str":"string","in_reply_to_user_id":1,"in_reply_to_user_id_str":"string","is_quote_status":true,"lang":"string","retweet_count":1,"retweeted":true,"source":"string","text":"string","truncated":true,"user":{"contributors_enabled":true,"created_at":"string","default_profile":true,"default_profile_image":true,"description":"string","favourites_count":1,"followers_count":1,"friends_count":1,"geo_enabled":true,"id":1,"id_str":"string","is_translator":true,"lang":"string","listed_count":1,"name":"string","profile_background_color":"string","profile_background_image_url":"string","profile_background_image_url_https":"string","profile_background_tile":true,"profile_banner_url":"string","profile_image_url":"string","profile_image_url_https":"string","profile_link_color":"string","profile_sidebar_border_color":"string","profile_sidebar_fill_color":"string","profile_text_color":"string","profile_use_background_image":true,"protected":true,"screen_name":"string","statuses_count":1,"verified":true}},"quoted_status_id":1,"quoted_status_id_str":"string","retweet_count":1,"retweeted":true,"source":"string","text":"string","timestamp_ms":"string","truncated":true,"user":{"contributors_enabled":true,"created_at":"string","default_profile":true,"default_profile_image":true,"description":"string","favourites_count":1,"followers_count":1,"friends_count":1,"geo_enabled":true,"id":1,"id_str":"string","is_translator":true,"lang":"string","listed_count":1,"location":"string","name":"string","profile_background_color":"string","profile_background_image_url":"string","profile_background_image_url_https":"string","profile_background_tile":true,"profile_banner_url":"string","profile_image_url":"string","profile_image_url_https":"string","profile_link_color":"string","profile_sidebar_border_color":"string","profile_sidebar_fill_color":"string","profile_text_color":"string","profile_use_background_image":true,"protected":true,"screen_name":"string","statuses_count":1,"time_zone":"string","url":"string","utc_offset":1,"verified":true}}
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/PushdownUtil.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/PushdownUtil.java
index b0cc50d..c94a86c 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/PushdownUtil.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/PushdownUtil.java
@@ -88,6 +88,27 @@
}
}
+ public static int getFieldNameId(AbstractFunctionCallExpression fieldAccessExpr) {
+ if (!BuiltinFunctions.FIELD_ACCESS_BY_INDEX.equals(fieldAccessExpr.getFunctionIdentifier())) {
+ return -1;
+ }
+
+ Integer fieldNameId = ConstantExpressionUtil.getIntArgument(fieldAccessExpr, 1);
+ if (fieldNameId == null) {
+ return -1;
+ }
+
+ return fieldNameId;
+ }
+
+ public static String getFieldName(AbstractFunctionCallExpression fieldAccessExpr) {
+ if (!BuiltinFunctions.FIELD_ACCESS_BY_NAME.equals(fieldAccessExpr.getFunctionIdentifier())) {
+ throw new IllegalStateException(
+ "Cannot get field name from " + fieldAccessExpr.getFunctionIdentifier().getName());
+ }
+ return ConstantExpressionUtil.getStringArgument(fieldAccessExpr, 1);
+ }
+
public static String getFieldName(AbstractFunctionCallExpression fieldAccessExpr, IVariableTypeEnvironment typeEnv)
throws AlgebricksException {
if (BuiltinFunctions.FIELD_ACCESS_BY_NAME.equals(fieldAccessExpr.getFunctionIdentifier())) {
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/APrintVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/APrintVisitor.java
index 76768aa..f7acb96 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/APrintVisitor.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/clean/APrintVisitor.java
@@ -38,12 +38,12 @@
public class APrintVisitor extends AbstractPrintVisitor {
@Override
protected AListPrinter createListPrinter(AListVisitablePointable accessor) {
- return new AListPrinter("[ ", " ]", ", ");
+ return new AListPrinter("[", "]", ",");
}
@Override
protected ARecordPrinter createRecordPrinter(ARecordVisitablePointable accessor) {
- return new ARecordPrinter("{ ", " }", ", ", ": ");
+ return new ARecordPrinter("{", "}", ",", ":");
}
@Override
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/losslessadm/APrintVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/losslessadm/APrintVisitor.java
index 025590b..0decbaa 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/losslessadm/APrintVisitor.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/printer/json/losslessadm/APrintVisitor.java
@@ -39,7 +39,7 @@
@Override
protected AListPrinter createListPrinter(AListVisitablePointable accessor) {
- return new AListPrinter("[ ", " ]", ", ") {
+ return new AListPrinter("[", "]", ",") {
@Override
protected ATypeTag getItemTypeTag(IVisitablePointable item, ATypeTag typeTag) {
// avoid MISSING to NULL conversion, because we print MISSING as is in this format
@@ -50,7 +50,7 @@
@Override
protected ARecordPrinter createRecordPrinter(ARecordVisitablePointable accessor) {
- return new ARecordPrinter("{ ", " }", ", ", ": ") {
+ return new ARecordPrinter("{", "}", ",", ":") {
@Override
protected void printFieldName(PrintStream ps, IPrintVisitor visitor, IVisitablePointable fieldName)
throws HyracksDataException {
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionManager.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionManager.java
index 7158558..d58eeeb 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionManager.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/functions/FunctionManager.java
@@ -65,9 +65,11 @@
Pair<FunctionIdentifier, Integer> key = new Pair<>(fid, fid.getArity());
IFunctionDescriptorFactory factory = functions.get(key);
if (factory == null) {
- String msg = "Inappropriate use of function '" + fid.getName() + "'";
+ String msg;
if (fid.equals(BuiltinFunctions.META)) {
- msg = msg + ". For example, after GROUP BY";
+ msg = "No source collection found for META(): collection not supported or cannot reference collection";
+ } else {
+ msg = "Could not resolve function '" + fid.getName() + "'";
}
throw AsterixException.create(ErrorCode.COMPILATION_ERROR, src, msg);
}
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java
index 015ce73..6fcbdce 100644
--- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java
+++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/writers/PrinterBasedWriterFactory.java
@@ -61,11 +61,10 @@
+ tAccess.getFieldStartOffset(tIdx, fields[i]);
int fldLen = tAccess.getFieldLength(tIdx, fields[i]);
if (i > 0) {
- printStream.print("; ");
+ printStream.print(';');
}
printers[i].print(tAccess.getBuffer().array(), fldStart, fldLen, printStream);
}
- printStream.println();
}
};
}
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/src/test/java/org/apache/hyracks/algebricks/tests/pushruntime/PushRuntimeTest.java b/hyracks-fullstack/algebricks/algebricks-tests/src/test/java/org/apache/hyracks/algebricks/tests/pushruntime/PushRuntimeTest.java
index d23f7f9..9265f52 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/src/test/java/org/apache/hyracks/algebricks/tests/pushruntime/PushRuntimeTest.java
+++ b/hyracks-fullstack/algebricks/algebricks-tests/src/test/java/org/apache/hyracks/algebricks/tests/pushruntime/PushRuntimeTest.java
@@ -178,7 +178,7 @@
StringBuilder buf = new StringBuilder();
readFileToString(outFile, buf);
- Assert.assertEquals("400; 3", buf.toString());
+ Assert.assertEquals("400;3", buf.toString());
outFile.delete();
}
@@ -570,7 +570,7 @@
StringBuilder buf = new StringBuilder();
readFileToString(outFile, buf);
- Assert.assertEquals("400; 3", buf.toString());
+ Assert.assertEquals("400;3", buf.toString());
outFile.delete();
}
@@ -796,9 +796,9 @@
RecordDescriptor sortDesc = scannerDesc;
String fileName = "scanMicroSortWrite.out";
- String filePath = PATH_ACTUAL + SEPARATOR + fileName;
- String resultFilePath = PATH_EXPECTED + SEPARATOR + fileName;
- File outFile = new File(filePath);
+ String actualFilePath = PATH_ACTUAL + SEPARATOR + fileName;
+ String expectedFilePath = PATH_EXPECTED + SEPARATOR + fileName;
+ File outFile = new File(actualFilePath);
SinkWriterRuntimeFactory writer = new SinkWriterRuntimeFactory(new int[] { 0, 1, 2, 3 },
new IPrinterFactory[] { IntegerPrinterFactory.INSTANCE, UTF8StringPrinterFactory.INSTANCE,
IntegerPrinterFactory.INSTANCE, UTF8StringPrinterFactory.INSTANCE },
@@ -814,7 +814,7 @@
spec.addRoot(algebricksOp);
AlgebricksHyracksIntegrationUtil.runJob(spec);
- compareFiles(filePath, resultFilePath);
+ compareFiles(expectedFilePath, actualFilePath);
outFile.delete();
}
diff --git a/hyracks-fullstack/algebricks/algebricks-tests/src/test/resources/results/scanMicroSortWrite.out b/hyracks-fullstack/algebricks/algebricks-tests/src/test/resources/results/scanMicroSortWrite.out
index 1c0fd6a..978196c 100644
--- a/hyracks-fullstack/algebricks/algebricks-tests/src/test/resources/results/scanMicroSortWrite.out
+++ b/hyracks-fullstack/algebricks/algebricks-tests/src/test/resources/results/scanMicroSortWrite.out
@@ -1,25 +1 @@
-0; "ALGERIA"; 0; " haggle. carefully final deposits detect slyly agai"
-1; "ARGENTINA"; 1; "al foxes promise slyly according to the regular accounts. bold requests alon"
-2; "BRAZIL"; 1; "y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special "
-3; "CANADA"; 1; "eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold"
-18; "CHINA"; 2; "c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos"
-4; "EGYPT"; 4; "y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d"
-5; "ETHIOPIA"; 0; "ven packages wake quickly. regu"
-6; "FRANCE"; 3; "refully final requests. regular, ironi"
-7; "GERMANY"; 3; "l platelets. regular accounts x-ray: unusual, regular acco"
-8; "INDIA"; 2; "ss excuses cajole slyly across the packages. deposits print aroun"
-9; "INDONESIA"; 2; " slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull"
-10; "IRAN"; 4; "efully alongside of the slyly final dependencies. "
-11; "IRAQ"; 4; "nic deposits boost atop the quickly final requests? quickly regula"
-12; "JAPAN"; 2; "ously. final, express gifts cajole a"
-13; "JORDAN"; 4; "ic deposits are blithely about the carefully regular pa"
-14; "KENYA"; 0; " pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t"
-15; "MOROCCO"; 0; "rns. blithely bold courts among the closely regular packages use furiously bold platelets?"
-16; "MOZAMBIQUE"; 0; "s. ironic, unusual asymptotes wake blithely r"
-17; "PERU"; 1; "platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun"
-19; "ROMANIA"; 3; "ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account"
-22; "RUSSIA"; 3; " requests against the platelets use never according to the quickly regular pint"
-20; "SAUDI ARABIA"; 4; "ts. silent requests haggle. closely express packages sleep across the blithely"
-23; "UNITED KINGDOM"; 3; "eans boost carefully special requests. accounts are. carefull"
-24; "UNITED STATES"; 1; "y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be"
-21; "VIETNAM"; 2; "hely enticingly express accounts. even, final "
+0;"ALGERIA";0;" haggle. carefully final deposits detect slyly agai"1;"ARGENTINA";1;"al foxes promise slyly according to the regular accounts. bold requests alon"2;"BRAZIL";1;"y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special "3;"CANADA";1;"eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold"18;"CHINA";2;"c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos"4;"EGYPT";4;"y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d"5;"ETHIOPIA";0;"ven packages wake quickly. regu"6;"FRANCE";3;"refully final requests. regular, ironi"7;"GERMANY";3;"l platelets. regular accounts x-ray: unusual, regular acco"8;"INDIA";2;"ss excuses cajole slyly across the packages. deposits print aroun"9;"INDONESIA";2;" slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull"10;"IRAN";4;"efully alongside of the slyly final dependencies. "11;"IRAQ";4;"nic deposits boost atop the quickly final requests? quickly regula"12;"JAPAN";2;"ously. final, express gifts cajole a"13;"JORDAN";4;"ic deposits are blithely about the carefully regular pa"14;"KENYA";0;" pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t"15;"MOROCCO";0;"rns. blithely bold courts among the closely regular packages use furiously bold platelets?"16;"MOZAMBIQUE";0;"s. ironic, unusual asymptotes wake blithely r"17;"PERU";1;"platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun"19;"ROMANIA";3;"ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account"22;"RUSSIA";3;" requests against the platelets use never according to the quickly regular pint"20;"SAUDI ARABIA";4;"ts. silent requests haggle. closely express packages sleep across the blithely"23;"UNITED KINGDOM";3;"eans boost carefully special requests. accounts are. carefull"24;"UNITED STATES";1;"y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be"21;"VIETNAM";2;"hely enticingly express accounts. even, final "
\ No newline at end of file
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
index d6698fe..a386ab8 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
@@ -34,6 +34,7 @@
import java.util.TimerTask;
import java.util.TreeMap;
import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
import org.apache.hyracks.api.application.IApplication;
import org.apache.hyracks.api.application.ICCApplication;
@@ -78,6 +79,7 @@
import org.apache.hyracks.control.common.ipc.CCNCFunctions;
import org.apache.hyracks.control.common.logs.LogFile;
import org.apache.hyracks.control.common.shutdown.ShutdownRun;
+import org.apache.hyracks.control.common.utils.HyracksThreadFactory;
import org.apache.hyracks.control.common.work.WorkQueue;
import org.apache.hyracks.ipc.api.IIPCI;
import org.apache.hyracks.ipc.impl.IPCSystem;
@@ -118,7 +120,7 @@
private final WorkQueue workQueue;
- private ExecutorService executor;
+ private ExecutorService executor = Executors.newCachedThreadPool(new HyracksThreadFactory("<bootstrap>"));
private final Timer timer;
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
index e173dcb..f3df6a8 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
@@ -35,6 +35,7 @@
import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
@@ -72,6 +73,7 @@
import org.apache.hyracks.control.common.ipc.CCNCFunctions;
import org.apache.hyracks.control.common.ipc.ClusterControllerRemoteProxy;
import org.apache.hyracks.control.common.job.profiling.om.JobProfile;
+import org.apache.hyracks.control.common.utils.HyracksThreadFactory;
import org.apache.hyracks.control.common.work.FutureValue;
import org.apache.hyracks.control.common.work.WorkQueue;
import org.apache.hyracks.control.nc.application.NCServiceContext;
@@ -145,7 +147,7 @@
private final Map<JobId, JobParameterByteStore> jobParameterByteStoreMap = new HashMap<>();
- private ExecutorService executor;
+ private ExecutorService executor = Executors.newCachedThreadPool(new HyracksThreadFactory("<bootstrap>"));
private Map<CcId, HeartbeatManager> heartbeatManagers = new ConcurrentHashMap<>();
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree-column/src/main/java/org/apache/hyracks/storage/am/lsm/btree/column/impls/lsm/LSMColumnBTree.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree-column/src/main/java/org/apache/hyracks/storage/am/lsm/btree/column/impls/lsm/LSMColumnBTree.java
index 958bfde..d12fbe9 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree-column/src/main/java/org/apache/hyracks/storage/am/lsm/btree/column/impls/lsm/LSMColumnBTree.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-btree-column/src/main/java/org/apache/hyracks/storage/am/lsm/btree/column/impls/lsm/LSMColumnBTree.java
@@ -87,6 +87,11 @@
@Override
public synchronized void activate() throws HyracksDataException {
super.activate();
+ postLoadingDiskComponents();
+ }
+
+ @Override
+ protected void postLoadingDiskComponents() throws HyracksDataException {
if (diskComponents.isEmpty()) {
columnMetadata = columnManager.activate();
} else {
@@ -95,6 +100,7 @@
}
diskCacheManager.activate(columnMetadata.getNumberOfColumns(), diskComponents, diskBufferCache);
+ super.postLoadingDiskComponents();
}
@Override
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
index 25d928c..e9a3abe 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
@@ -200,6 +200,10 @@
throw HyracksDataException.create(ErrorCode.CANNOT_ACTIVATE_ACTIVE_INDEX);
}
loadDiskComponents();
+ postLoadingDiskComponents();
+ }
+
+ protected void postLoadingDiskComponents() throws HyracksDataException {
isActive = true;
}