skoppu22 commented on code in PR #109:
URL: 
https://github.com/apache/cassandra-analytics/pull/109#discussion_r2075300073


##########
cassandra-analytics-integration-tests/src/test/java/org/apache/cassandra/analytics/BulkWriteUdtTest.java:
##########
@@ -59,6 +59,59 @@ class BulkWriteUdtTest extends 
SharedClusterSparkIntegrationTestBase
                                                      + "           id BIGINT 
PRIMARY KEY,\n"
                                                      + "           nested " + 
NESTED_FIELD_UDT_NAME + ");";
 
+    // UDT with list, set and map in it
+    public static final String UDT_WITH_COLLECTIONS_TYPE_NAME = 
"udt_with_collections";
+    public static final String UDT_WITH_COLLECTIONS_TYPE_CREATE = "CREATE TYPE 
" + TEST_KEYSPACE + "." + UDT_WITH_COLLECTIONS_TYPE_NAME +
+            " (f1 list<text>, f2 set<int>, f3 map<int, text>);";
+
+    // table with list of UDTs, and UDT itself has collections in it
+    public static final QualifiedName LIST_OF_UDT_SOURCE_TABLE = new 
QualifiedName(TEST_KEYSPACE, "list_of_udt_src");
+    public static final QualifiedName LIST_OF_UDT_DEST_TABLE = new 
QualifiedName(TEST_KEYSPACE, "list_of_udt_dest");
+    public static final String LIST_OF_UDT_TABLE_CREATE = "CREATE TABLE %s.%s 
(\n"
+            + "            id BIGINT PRIMARY KEY,\n"
+            + "            udtlist frozen<list<frozen<" + 
UDT_WITH_COLLECTIONS_TYPE_NAME + ">>>)";
+
+    // table with set of UDTs, and UDT itself has collections in it
+    public static final QualifiedName SET_OF_UDT_SOURCE_TABLE = new 
QualifiedName(TEST_KEYSPACE, "set_of_udt_src");
+    public static final QualifiedName SET_OF_UDT_DEST_TABLE = new 
QualifiedName(TEST_KEYSPACE, "set_of_udt_dest");
+    public static final String SET_OF_UDT_TABLE_CREATE = "CREATE TABLE %s.%s 
(\n"
+            + "            id BIGINT PRIMARY KEY,\n"
+            + "            udtset frozen<set<frozen<" + 
UDT_WITH_COLLECTIONS_TYPE_NAME + ">>>)";
+
+    // table with map of UDTs, and UDT itself has collections in it
+    public static final QualifiedName MAP_OF_UDT_SOURCE_TABLE = new 
QualifiedName(TEST_KEYSPACE, "map_of_udt_src");
+    public static final QualifiedName MAP_OF_UDT_DEST_TABLE = new 
QualifiedName(TEST_KEYSPACE, "map_of_udt_dest");
+    public static final String MAP_OF_UDT_TABLE_CREATE = "CREATE TABLE %s.%s 
(\n"
+            + "            id BIGINT PRIMARY KEY,\n"
+            + "            udtmap frozen<map<frozen<" + 
UDT_WITH_COLLECTIONS_TYPE_NAME + ">, frozen<" + UDT_WITH_COLLECTIONS_TYPE_NAME 
+ ">>>)";
+
+    // udt with list of UDTs inside it
+    public static final String UDT_WITH_LIST_OF_UDT_TYPE_NAME = 
"udt_with_list_of_udt_type";
+    public static final String UDT_WITH_LIST_OF_UDT_TYPE_CREATE = "CREATE TYPE 
" + TEST_KEYSPACE + "." + UDT_WITH_LIST_OF_UDT_TYPE_NAME +
+            " (innerudt list<frozen<" + TWO_FIELD_UDT_NAME + ">>);";
+    public static final QualifiedName UDT_WITH_LIST_OF_UDT_SOURCE_TABLE = new 
QualifiedName(TEST_KEYSPACE, "udt_with_list_of_udt_src");
+    public static final QualifiedName UDT_WITH_LIST_OF_UDT_DEST_TABLE = new 
QualifiedName(TEST_KEYSPACE, "udt_with_list_of_udt_dest");
+
+    // udt with set of UDTs inside it
+    public static final String UDT_WITH_SET_OF_UDT_TYPE_NAME = 
"udt_with_set_of_udt_type";
+    public static final String UDT_WITH_SET_OF_UDT_TYPE_CREATE = "CREATE TYPE 
" + TEST_KEYSPACE + "." + UDT_WITH_SET_OF_UDT_TYPE_NAME +
+            " (innerudt set<frozen<" + TWO_FIELD_UDT_NAME + ">>);";
+    public static final QualifiedName UDT_WITH_SET_OF_UDT_SOURCE_TABLE = new 
QualifiedName(TEST_KEYSPACE, "udt_with_set_of_udt_src");
+    public static final QualifiedName UDT_WITH_SET_OF_UDT_DEST_TABLE = new 
QualifiedName(TEST_KEYSPACE, "udt_with_set_of_udt_dest");
+
+    // udt with map of UDTs inside it
+    public static final String UDT_WITH_MAP_OF_UDT_TYPE_NAME = 
"udt_with_map_of_udt_type";
+    public static final String UDT_WITH_MAP_OF_UDT_TYPE_CREATE = "CREATE TYPE 
" + TEST_KEYSPACE + "." + UDT_WITH_MAP_OF_UDT_TYPE_NAME +
+            " (innerudt map<frozen<" + TWO_FIELD_UDT_NAME + ">, frozen<" + 
TWO_FIELD_UDT_NAME + ">>);";
+    public static final QualifiedName UDT_WITH_MAP_OF_UDT_SOURCE_TABLE = new 
QualifiedName(TEST_KEYSPACE, "udt_with_map_of_udt_src");
+    public static final QualifiedName UDT_WITH_MAP_OF_UDT_DEST_TABLE = new 
QualifiedName(TEST_KEYSPACE, "udt_with_map_of_udt_dest");
+
+    // Table with UDT which contains either a list or set or map of UDTs 
inside it
+    public static final String UDT_WITH_COLLECTION_OF_UDT_TABLE_CREATE = 
"CREATE TABLE %s.%s (\n"
+            + "            id BIGINT PRIMARY KEY,\n"
+            + "            outerudt frozen<%s>)";
+
+

Review Comment:
   As I mentioned in the PR description, there is lot more to be done to handle 
Tuples, support for Tuples will come in another PR/task



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to