parthchandra commented on code in PR #1788:
URL: https://github.com/apache/datafusion-comet/pull/1788#discussion_r2109745284


##########
native/core/src/execution/planner.rs:
##########
@@ -3232,4 +3232,113 @@ mod tests {
 
         Ok(())
     }
+
+    /*
+    Testing a nested types scenario map[struct, struct]
+
+    select map_keys(m).b from (
+        select map(named_struct('a', 1, 'b', 'n', 'c', 'x'), named_struct('a', 
1, 'b', 'n', 'c', 'x')) m
+     */
+    #[tokio::test]
+    async fn test_nested_types_map_keys_by_index() -> Result<(), 
DataFusionError> {

Review Comment:
   nit: what does the by_index part of the name refer to?



##########
spark/src/test/scala/org/apache/spark/sql/CometTestBase.scala:
##########
@@ -862,7 +862,8 @@ abstract class CometTestBase
       testName: String = "test",
       tableName: String = "tbl",
       sqlConf: Seq[(String, String)] = Seq.empty,
-      debugCometDF: DataFrame => Unit = _ => ()): Unit = {
+      debugCometDF: DataFrame => Unit = _ => (),
+      checkCometOperator: Boolean = true): Unit = {

Review Comment:
   Is this related?



##########
native/core/src/execution/planner.rs:
##########
@@ -3232,4 +3232,113 @@ mod tests {
 
         Ok(())
     }
+
+    /*
+    Testing a nested types scenario map[struct, struct]
+
+    select map_keys(m).b from (
+        select map(named_struct('a', 1, 'b', 'n', 'c', 'x'), named_struct('a', 
1, 'b', 'n', 'c', 'x')) m
+     */
+    #[tokio::test]
+    async fn test_nested_types_map_keys_by_index() -> Result<(), 
DataFusionError> {
+        let session_ctx = SessionContext::new();
+
+        // generate test data in the temp folder
+        let test_data = "select map([named_struct('a', 1, 'b', 'n', 'c', 
'x')], [named_struct('a', 1, 'b', 'n', 'c', 'x')]) c0";

Review Comment:
   minor: can we use a different struct for the key and the value, just to make 
it clear we are reading the correct fields.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to