You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2021/03/10 12:13:50 UTC
[ignite-3] branch ignite-13618 updated: IGNITE-13618 Introduce
absolute column index (test)
This is an automated email from the ASF dual-hosted git repository.
agoncharuk pushed a commit to branch ignite-13618
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/ignite-13618 by this push:
new f1dd492 IGNITE-13618 Introduce absolute column index (test)
f1dd492 is described below
commit f1dd49281d1c5a0f80bf3b5153fdbe36d66afc5d
Author: Alexey Goncharuk <al...@gmail.com>
AuthorDate: Wed Mar 10 15:13:44 2021 +0300
IGNITE-13618 Introduce absolute column index (test)
---
.../internal/schema/SchemaDescriptorTest.java | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/modules/commons/src/test/java/org/apache/ignite/internal/schema/SchemaDescriptorTest.java b/modules/commons/src/test/java/org/apache/ignite/internal/schema/SchemaDescriptorTest.java
new file mode 100644
index 0000000..13e5158
--- /dev/null
+++ b/modules/commons/src/test/java/org/apache/ignite/internal/schema/SchemaDescriptorTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.schema;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+/**
+ *
+ */
+public class SchemaDescriptorTest {
+ @Test
+ public void testColumnIndexedAccess() {
+ SchemaDescriptor desc = new SchemaDescriptor(1,
+ new Column[] {
+ new Column("columnA",NativeType.BYTE, false),
+ new Column("columnB",NativeType.UUID, false),
+ new Column("columnC",NativeType.INTEGER, false),
+ },
+ new Column[] {
+ new Column("columnD",NativeType.BYTE, false),
+ new Column("columnE",NativeType.UUID, false),
+ new Column("columnF",NativeType.INTEGER, false),
+ }
+ );
+
+ for (int i = 0; i < desc.length(); i++)
+ Assertions.assertEquals(i, desc.column(i).schemaIndex());
+ }
+}