append function doesn't work as expected (arangodb)
<p>These are few queries which I executed and the results. The fourth one throws error.</p>

<pre><code>LET doc = DOCUMENT("sample/xyz")
RETURN doc.t==null
</code></pre>

<p>result: True   (as key xyz doesn't exist)</p>

<hr>

<pre><code>RETURN append(null,[1,2,2],true)
</code></pre>

<p>result : [1,2]  (unique values appended to empty list)</p>

<hr>

<pre><code>LET doc = DOCUMENT("sample/xyz")
return append(doc.t,[1,2,2])
</code></pre>

<p>result : [1,2,2]  ([1,2,2] appended to empty list)</p>

<hr>

<pre><code>LET doc = DOCUMENT("sample/xyz")
RETURN append(doc.t,[1,2,2],True)
</code></pre>

<p>throws <strong>error</strong> whereas <strong>doc.t</strong> should evaluate to <strong>null</strong> and result should be <strong>[1,2]</strong>.</p>

<p>The error that I got is here :</p>

<pre><code>Query: Expecting type Array or Object (while executing) (exception location: /var/lib/jenkins/workspace/ArangoDB_Release/arangod/RestHandler/RestCursorHandler.cpp:131)
</code></pre>