You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ht...@apache.org on 2019/08/03 05:19:12 UTC

[asterixdb] branch master updated: [ASTERIXDB-2619][FUN] Add extra test cases for bitwise functions

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 72bca2a  [ASTERIXDB-2619][FUN] Add extra test cases for bitwise functions
72bca2a is described below

commit 72bca2a63799442c23f183f6acc95caeccb7e2a4
Author: Hussain Towaileb <Hu...@Couchbase.com>
AuthorDate: Fri Aug 2 05:25:47 2019 +0300

    [ASTERIXDB-2619][FUN] Add extra test cases for bitwise functions
    
    - user model changes: no
    - storage format changes: no
    - interface changes: no
    
    Details:
    - Added test cases based on reading data from dataset to ensure
      the function performs properly on subsequent calls, and ensure
      it works properly if it doesn't go through the constant folding
      rule.
    - Fixed an issue in the bitcount function which was resulting in
      Serialization Exception when calling the function with fields
      rather than constants.
    - Fixed an issue with bittest and isbitset which was resulting in
      wrong value in some cases due to not reseting the monitoring of
      allSet check flag.
    
    Change-Id: Ie1d8e4f8594843f98e7a1cf8a2da4b0106597ae8
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/3514
    Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Hussain Towaileb <hu...@gmail.com>
    Reviewed-by: Dmitry Lychagin <dm...@couchbase.com>
---
 .../bitwise/bit_and_04/bit_and_04.1.ddl.sqlpp      | 32 ++++++++++++
 .../bitwise/bit_and_04/bit_and_04.2.update.sqlpp   | 28 ++++++++++
 .../bitwise/bit_and_04/bit_and_04.3.query.sqlpp    | 24 +++++++++
 .../bitwise/bit_and_04/bit_and_04.4.ddl.sqlpp      | 20 ++++++++
 .../bitwise/bit_clear_03/bit_clear_03.1.ddl.sqlpp  | 31 +++++++++++
 .../bit_clear_03/bit_clear_03.2.update.sqlpp       | 28 ++++++++++
 .../bit_clear_03/bit_clear_03.3.query.sqlpp        | 24 +++++++++
 .../bitwise/bit_clear_03/bit_clear_03.4.ddl.sqlpp  | 20 ++++++++
 .../bitwise/bit_count_03/bit_count_03.1.ddl.sqlpp  | 31 +++++++++++
 .../bit_count_03/bit_count_03.2.update.sqlpp       | 28 ++++++++++
 .../bit_count_03/bit_count_03.3.query.sqlpp        | 24 +++++++++
 .../bitwise/bit_count_03/bit_count_03.4.ddl.sqlpp  | 20 ++++++++
 .../bitwise/bit_not_03/bit_not_03.1.ddl.sqlpp      | 31 +++++++++++
 .../bitwise/bit_not_03/bit_not_03.2.update.sqlpp   | 28 ++++++++++
 .../bitwise/bit_not_03/bit_not_03.3.query.sqlpp    | 24 +++++++++
 .../bitwise/bit_not_03/bit_not_03.4.ddl.sqlpp      | 20 ++++++++
 .../bitwise/bit_or_04/bit_or_04.1.ddl.sqlpp        | 32 ++++++++++++
 .../bitwise/bit_or_04/bit_or_04.2.update.sqlpp     | 28 ++++++++++
 .../bitwise/bit_or_04/bit_or_04.3.query.sqlpp      | 24 +++++++++
 .../bitwise/bit_or_04/bit_or_04.4.ddl.sqlpp        | 20 ++++++++
 .../bitwise/bit_set_03/bit_set_03.1.ddl.sqlpp      | 31 +++++++++++
 .../bitwise/bit_set_03/bit_set_03.2.update.sqlpp   | 28 ++++++++++
 .../bitwise/bit_set_03/bit_set_03.3.query.sqlpp    | 24 +++++++++
 .../bitwise/bit_set_03/bit_set_03.4.ddl.sqlpp      | 20 ++++++++
 .../bitwise/bit_shift_03/bit_shift_03.1.ddl.sqlpp  | 33 ++++++++++++
 .../bit_shift_03/bit_shift_03.2.update.sqlpp       | 28 ++++++++++
 .../bit_shift_03/bit_shift_03.3.query.sqlpp        | 24 +++++++++
 .../bitwise/bit_shift_03/bit_shift_03.4.ddl.sqlpp  | 20 ++++++++
 .../bitwise/bit_shift_04/bit_shift_04.1.ddl.sqlpp  | 32 ++++++++++++
 .../bit_shift_04/bit_shift_04.2.update.sqlpp       | 28 ++++++++++
 .../bit_shift_04/bit_shift_04.3.query.sqlpp        | 24 +++++++++
 .../bitwise/bit_shift_04/bit_shift_04.4.ddl.sqlpp  | 20 ++++++++
 .../bitwise/bit_test_03/bit_test_03.1.ddl.sqlpp    | 32 ++++++++++++
 .../bitwise/bit_test_03/bit_test_03.2.update.sqlpp | 28 ++++++++++
 .../bitwise/bit_test_03/bit_test_03.3.query.sqlpp  | 24 +++++++++
 .../bitwise/bit_test_03/bit_test_03.4.ddl.sqlpp    | 20 ++++++++
 .../bitwise/bit_test_04/bit_test_04.1.ddl.sqlpp    | 31 +++++++++++
 .../bitwise/bit_test_04/bit_test_04.2.update.sqlpp | 28 ++++++++++
 .../bitwise/bit_test_04/bit_test_04.3.query.sqlpp  | 24 +++++++++
 .../bitwise/bit_test_04/bit_test_04.4.ddl.sqlpp    | 20 ++++++++
 .../bitwise/bit_xor_04/bit_xor_04.1.ddl.sqlpp      | 32 ++++++++++++
 .../bitwise/bit_xor_04/bit_xor_04.2.update.sqlpp   | 28 ++++++++++
 .../bitwise/bit_xor_04/bit_xor_04.3.query.sqlpp    | 24 +++++++++
 .../bitwise/bit_xor_04/bit_xor_04.4.ddl.sqlpp      | 20 ++++++++
 .../is_bit_set_03/is_bit_set_03.1.ddl.sqlpp        | 32 ++++++++++++
 .../is_bit_set_03/is_bit_set_03.2.update.sqlpp     | 28 ++++++++++
 .../is_bit_set_03/is_bit_set_03.3.query.sqlpp      | 24 +++++++++
 .../is_bit_set_03/is_bit_set_03.4.ddl.sqlpp        | 20 ++++++++
 .../results/bitwise/bit_and_04/bit_and_04.1.adm    |  5 ++
 .../bitwise/bit_clear_03/bit_clear_03.1.adm        |  5 ++
 .../bitwise/bit_count_03/bit_count_03.1.adm        |  5 ++
 .../results/bitwise/bit_not_03/bit_not_03.1.adm    |  5 ++
 .../results/bitwise/bit_or_04/bit_or_04.1.adm      |  5 ++
 .../results/bitwise/bit_set_03/bit_set_03.1.adm    |  5 ++
 .../bitwise/bit_shift_03/bit_shift_03.1.adm        |  5 ++
 .../bitwise/bit_shift_04/bit_shift_04.1.adm        |  5 ++
 .../results/bitwise/bit_test_03/bit_set_03.1.adm   |  5 ++
 .../results/bitwise/bit_test_04/bit_set_04.1.adm   |  5 ++
 .../results/bitwise/bit_xor_04/bit_xor_04.1.adm    |  5 ++
 .../bitwise/is_bit_set_03/is_bit_set_03.1.adm      |  5 ++
 .../bitwise/is_bit_set_04/is_bit_set_04.1.adm      |  5 ++
 .../test/resources/runtimets/testsuite_sqlpp.xml   | 60 ++++++++++++++++++++++
 .../functions/bitwise/BitCountDescriptor.java      |  8 +--
 .../bitwise/BitValuePositionFlagEvaluator.java     |  3 +-
 64 files changed, 1375 insertions(+), 5 deletions(-)

diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.1.ddl.sqlpp
new file mode 100644
index 0000000..512a193
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.1.ddl.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.
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use test;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64,
+f2: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.2.update.sqlpp
new file mode 100644
index 0000000..83f0e99
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2},
+{"f1": 3, "f2": 4},
+{"f1": 5, "f2": 6},
+{"f1": 7, "f2": 8},
+{"f1": 9, "f2": 10}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.3.query.sqlpp
new file mode 100644
index 0000000..f973d44
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitand(f1, f2)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_and_04/bit_and_04.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.1.ddl.sqlpp
new file mode 100644
index 0000000..dba459c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.1.ddl.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.2.update.sqlpp
new file mode 100644
index 0000000..3e3cbb6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2},
+{"f1": 3, "f2": 4},
+{"f1": 5, "f2": [1, 2, 4]},
+{"f1": 7, "f2": [1, 3, 4]},
+{"f1": 9, "f2": [1, 2, 3]}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.3.query.sqlpp
new file mode 100644
index 0000000..408c528
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitclear(f1, f2)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_clear_03/bit_clear_03.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.1.ddl.sqlpp
new file mode 100644
index 0000000..dba459c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.1.ddl.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.2.update.sqlpp
new file mode 100644
index 0000000..ae4c029
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.2.update.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;
+
+insert into test([
+{"f1": 1},
+{"f1": 3},
+{"f1": 5},
+{"f1": 7},
+{"f1": 9}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.3.query.sqlpp
new file mode 100644
index 0000000..42a0355
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitcount(f1)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_count_03/bit_count_03.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.1.ddl.sqlpp
new file mode 100644
index 0000000..dba459c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.1.ddl.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.2.update.sqlpp
new file mode 100644
index 0000000..ae4c029
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.2.update.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;
+
+insert into test([
+{"f1": 1},
+{"f1": 3},
+{"f1": 5},
+{"f1": 7},
+{"f1": 9}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.3.query.sqlpp
new file mode 100644
index 0000000..bf6f3d4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitnot(f1)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_not_03/bit_not_03.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.1.ddl.sqlpp
new file mode 100644
index 0000000..512a193
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.1.ddl.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.
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use test;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64,
+f2: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.2.update.sqlpp
new file mode 100644
index 0000000..83f0e99
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2},
+{"f1": 3, "f2": 4},
+{"f1": 5, "f2": 6},
+{"f1": 7, "f2": 8},
+{"f1": 9, "f2": 10}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.3.query.sqlpp
new file mode 100644
index 0000000..e931502
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitor(f1, f2)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_or_04/bit_or_04.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.1.ddl.sqlpp
new file mode 100644
index 0000000..dba459c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.1.ddl.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.2.update.sqlpp
new file mode 100644
index 0000000..3ed19b8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2},
+{"f1": 3, "f2": 4},
+{"f1": 5, "f2": [1, 2]},
+{"f1": 7, "f2": [3, 4]},
+{"f1": 9, "f2": [5, 6]}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.3.query.sqlpp
new file mode 100644
index 0000000..93764d9
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitset(f1, f2)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_set_03/bit_set_03.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.1.ddl.sqlpp
new file mode 100644
index 0000000..b953d25
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.1.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;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64,
+f2: int64,
+f3: boolean
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.2.update.sqlpp
new file mode 100644
index 0000000..eada03f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2, "f3": true},
+{"f1": 3, "f2": 4, "f3": false},
+{"f1": 5, "f2": 6, "f3": true},
+{"f1": 7, "f2": 8, "f3": false},
+{"f1": 9, "f2": 10, "f3": true}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.3.query.sqlpp
new file mode 100644
index 0000000..046b8eb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitshift(f1, f2, f3)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_03/bit_shift_03.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.1.ddl.sqlpp
new file mode 100644
index 0000000..512a193
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.1.ddl.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.
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use test;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64,
+f2: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.2.update.sqlpp
new file mode 100644
index 0000000..83f0e99
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2},
+{"f1": 3, "f2": 4},
+{"f1": 5, "f2": 6},
+{"f1": 7, "f2": 8},
+{"f1": 9, "f2": 10}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.3.query.sqlpp
new file mode 100644
index 0000000..9d5acfe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitshift(f1, f2)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_shift_04/bit_shift_04.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.1.ddl.sqlpp
new file mode 100644
index 0000000..8a8b76e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.1.ddl.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.
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use test;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64,
+f3: boolean
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.2.update.sqlpp
new file mode 100644
index 0000000..9aa4fd6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2, "f3": true},
+{"f1": 3, "f2": 4, "f3": false},
+{"f1": 5, "f2": [1, 2], "f3": true},
+{"f1": 7, "f2": [3, 4], "f3": false},
+{"f1": 9, "f2": [1, 4], "f3": true}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.3.query.sqlpp
new file mode 100644
index 0000000..46162c2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bittest(f1, f2, f3)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_03/bit_test_03.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.1.ddl.sqlpp
new file mode 100644
index 0000000..dba459c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.1.ddl.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.2.update.sqlpp
new file mode 100644
index 0000000..ae989d4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2},
+{"f1": 3, "f2": 4},
+{"f1": 5, "f2": [1, 2]},
+{"f1": 7, "f2": [3, 4]},
+{"f1": 9, "f2": [1, 4]}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.3.query.sqlpp
new file mode 100644
index 0000000..31f7a27
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bittest(f1, f2)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_test_04/bit_test_04.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.1.ddl.sqlpp
new file mode 100644
index 0000000..512a193
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.1.ddl.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.
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use test;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64,
+f2: int64
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.2.update.sqlpp
new file mode 100644
index 0000000..83f0e99
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2},
+{"f1": 3, "f2": 4},
+{"f1": 5, "f2": 6},
+{"f1": 7, "f2": 8},
+{"f1": 9, "f2": 10}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.3.query.sqlpp
new file mode 100644
index 0000000..e5a2910
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 bitxor(f1, f2)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/bit_xor_04/bit_xor_04.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.1.ddl.sqlpp
new file mode 100644
index 0000000..8a8b76e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.1.ddl.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.
+ */
+
+drop dataverse test if exists;
+create dataverse test;
+use test;
+
+drop type test if exists;
+create type test as {
+id: uuid,
+f1: int64,
+f3: boolean
+};
+
+drop dataset test if exists;
+create dataset test(test) primary key id autogenerated;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.2.update.sqlpp
new file mode 100644
index 0000000..9aa4fd6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.2.update.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;
+
+insert into test([
+{"f1": 1, "f2": 2, "f3": true},
+{"f1": 3, "f2": 4, "f3": false},
+{"f1": 5, "f2": [1, 2], "f3": true},
+{"f1": 7, "f2": [3, 4], "f3": false},
+{"f1": 9, "f2": [1, 4], "f3": true}
+]);
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.3.query.sqlpp
new file mode 100644
index 0000000..88c884d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.3.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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 isbitset(f1, f2, f3)
+from test
+order by f1 asc;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.4.ddl.sqlpp
new file mode 100644
index 0000000..548e632
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/bitwise/is_bit_set_03/is_bit_set_03.4.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * 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;
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_and_04/bit_and_04.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_and_04/bit_and_04.1.adm
new file mode 100644
index 0000000..f5c1213
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_and_04/bit_and_04.1.adm
@@ -0,0 +1,5 @@
+0
+0
+4
+0
+8
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_clear_03/bit_clear_03.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_clear_03/bit_clear_03.1.adm
new file mode 100644
index 0000000..f6f28e7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_clear_03/bit_clear_03.1.adm
@@ -0,0 +1,5 @@
+1
+3
+4
+2
+8
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_count_03/bit_count_03.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_count_03/bit_count_03.1.adm
new file mode 100644
index 0000000..cd79991
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_count_03/bit_count_03.1.adm
@@ -0,0 +1,5 @@
+1
+2
+2
+3
+2
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_not_03/bit_not_03.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_not_03/bit_not_03.1.adm
new file mode 100644
index 0000000..3a642af
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_not_03/bit_not_03.1.adm
@@ -0,0 +1,5 @@
+-2
+-4
+-6
+-8
+-10
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_or_04/bit_or_04.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_or_04/bit_or_04.1.adm
new file mode 100644
index 0000000..7284aef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_or_04/bit_or_04.1.adm
@@ -0,0 +1,5 @@
+3
+7
+7
+15
+11
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_set_03/bit_set_03.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_set_03/bit_set_03.1.adm
new file mode 100644
index 0000000..265189a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_set_03/bit_set_03.1.adm
@@ -0,0 +1,5 @@
+3
+11
+7
+15
+57
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_shift_03/bit_shift_03.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_shift_03/bit_shift_03.1.adm
new file mode 100644
index 0000000..467b45b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_shift_03/bit_shift_03.1.adm
@@ -0,0 +1,5 @@
+4
+48
+320
+1792
+9216
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_shift_04/bit_shift_04.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_shift_04/bit_shift_04.1.adm
new file mode 100644
index 0000000..467b45b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_shift_04/bit_shift_04.1.adm
@@ -0,0 +1,5 @@
+4
+48
+320
+1792
+9216
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_test_03/bit_set_03.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_test_03/bit_set_03.1.adm
new file mode 100644
index 0000000..06b31bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_test_03/bit_set_03.1.adm
@@ -0,0 +1,5 @@
+false
+false
+false
+true
+true
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_test_04/bit_set_04.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_test_04/bit_set_04.1.adm
new file mode 100644
index 0000000..904805d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_test_04/bit_set_04.1.adm
@@ -0,0 +1,5 @@
+false
+false
+true
+true
+true
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_xor_04/bit_xor_04.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_xor_04/bit_xor_04.1.adm
new file mode 100644
index 0000000..636dafe
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/bit_xor_04/bit_xor_04.1.adm
@@ -0,0 +1,5 @@
+3
+7
+3
+15
+3
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/is_bit_set_03/is_bit_set_03.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/is_bit_set_03/is_bit_set_03.1.adm
new file mode 100644
index 0000000..06b31bd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/is_bit_set_03/is_bit_set_03.1.adm
@@ -0,0 +1,5 @@
+false
+false
+false
+true
+true
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/is_bit_set_04/is_bit_set_04.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/is_bit_set_04/is_bit_set_04.1.adm
new file mode 100644
index 0000000..904805d
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/bitwise/is_bit_set_04/is_bit_set_04.1.adm
@@ -0,0 +1,5 @@
+false
+false
+true
+true
+true
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index aab320f..5bc1650 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -2758,6 +2758,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_and_04">
+        <output-dir compare="Text">bit_and_04</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="bit_or_01">
         <output-dir compare="Text">bit_or_01</output-dir>
       </compilation-unit>
@@ -2774,6 +2779,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_or_04">
+        <output-dir compare="Text">bit_or_04</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="bit_xor_01">
         <output-dir compare="Text">bit_xor_01</output-dir>
       </compilation-unit>
@@ -2790,6 +2800,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_xor_04">
+        <output-dir compare="Text">bit_xor_04</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="bit_not_01">
         <output-dir compare="Text">bit_not_01</output-dir>
       </compilation-unit>
@@ -2800,6 +2815,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_not_03">
+        <output-dir compare="Text">bit_not_03</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="bit_count_01">
         <output-dir compare="Text">bit_count_01</output-dir>
       </compilation-unit>
@@ -2810,6 +2830,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_count_03">
+        <output-dir compare="Text">bit_count_03</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="bit_set_01">
         <output-dir compare="Text">bit_set_01</output-dir>
       </compilation-unit>
@@ -2820,6 +2845,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_set_03">
+        <output-dir compare="Text">bit_set_03</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="bit_clear_01">
         <output-dir compare="Text">bit_clear_01</output-dir>
       </compilation-unit>
@@ -2830,6 +2860,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_clear_03">
+        <output-dir compare="Text">bit_clear_03</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="bit_shift_01">
         <output-dir compare="Text">bit_shift_01</output-dir>
       </compilation-unit>
@@ -2840,6 +2875,16 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_shift_03">
+        <output-dir compare="Text">bit_shift_03</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
+      <compilation-unit name="bit_shift_04">
+        <output-dir compare="Text">bit_shift_04</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="bit_test_01">
         <output-dir compare="Text">bit_test_01</output-dir>
       </compilation-unit>
@@ -2850,6 +2895,16 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="bitwise">
+      <compilation-unit name="bit_test_03">
+        <output-dir compare="Text">bit_test_03</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
+      <compilation-unit name="bit_test_04">
+        <output-dir compare="Text">bit_test_04</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="bitwise">
       <compilation-unit name="is_bit_set_01">
         <output-dir compare="Text">is_bit_set_01</output-dir>
       </compilation-unit>
@@ -2859,6 +2914,11 @@
         <output-dir compare="Text">is_bit_set_02</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="bitwise">
+      <compilation-unit name="is_bit_set_03">
+        <output-dir compare="Text">is_bit_set_03</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="boolean">
     <test-case FilePath="boolean">
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitCountDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitCountDescriptor.java
index ba885b5..8daa6b0 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitCountDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitCountDescriptor.java
@@ -49,14 +49,14 @@ public class BitCountDescriptor extends AbstractScalarFunctionDynamicDescriptor
         return new IScalarEvaluatorFactory() {
             private static final long serialVersionUID = 1L;
 
-            private final AMutableInt32 resultMutableInt32 = new AMutableInt32(0);
-            private final ISerializerDeserializer aInt32Serde =
-                    SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AINT32);
-
             @Override
             public IScalarEvaluator createScalarEvaluator(final IEvaluatorContext ctx) throws HyracksDataException {
                 return new AbstractBitSingleValueEvaluator(ctx, args, getIdentifier(), sourceLoc) {
 
+                    private final AMutableInt32 resultMutableInt32 = new AMutableInt32(0);
+                    private final ISerializerDeserializer aInt32Serde =
+                            SerializerDeserializerProvider.INSTANCE.getSerializerDeserializer(BuiltinType.AINT32);
+
                     @Override
                     void applyBitwiseOperation(long value) {
                         resultMutableInt32.setValue(Long.bitCount(value));
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitValuePositionFlagEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitValuePositionFlagEvaluator.java
index 85e033b..aee037d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitValuePositionFlagEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitValuePositionFlagEvaluator.java
@@ -85,7 +85,7 @@ class BitValuePositionFlagEvaluator extends AbstractScalarEval {
 
     // This flag has a special purpose. In some cases, when an array of positions is passed, checking
     // some arguments might be enough to return the final result, but, instead of stopping, we need to
-    // continue looping because if any value in array is invalid, we should return a null instead of
+    // continue looping because if any value in the positions array is invalid, we should return a null instead of
     // the boolean result, this flag will keep the loop going just for checking the values, while the
     // final result is already set previously.
     private boolean isStopUpdatingResultBoolean = false;
@@ -167,6 +167,7 @@ class BitValuePositionFlagEvaluator extends AbstractScalarEval {
 
         // Third argument
         boolean isAllSet = false;
+        isStopUpdatingResultBoolean = false; // Reset the flag to false for each new tuple
         if (flagEvaluator != null) {
             byte[] flagBytes = flagPointable.getByteArray();
             int flagStartOffset = flagPointable.getStartOffset();