richtia commented on PR #14143:
URL: https://github.com/apache/arrow/pull/14143#issuecomment-1248828931

   > @richtia Can you upload an entire DuckDb plan? Something simple hopefully 
that has at least one function.
   
   SQL:
   ```
   SELECT add(PS_PARTKEY, PS_SUPPKEY) AS ADD_KEY
   FROM 'partsupp';
   ```
   
   Substrait Plan:
   ```
   {
     "extensions": [
       {
         "extensionFunction": {
           "functionAnchor": 1,
           "name": "add"
         }
       }
     ],
     "relations": [
       {
         "root": {
           "input": {
             "project": {
               "input": {
                 "read": {
                   "baseSchema": {
                     "names": [
                       "ps_partkey",
                       "ps_suppkey",
                       "ps_availqty",
                       "ps_supplycost",
                       "ps_comment"
                     ],
                     "struct": {
                       "types": [
                         {
                           "i32": {
                             "nullability": "NULLABILITY_NULLABLE"
                           }
                         },
                         {
                           "i32": {
                             "nullability": "NULLABILITY_NULLABLE"
                           }
                         },
                         {
                           "i32": {
                             "nullability": "NULLABILITY_NULLABLE"
                           }
                         },
                         {
                           "decimal": {
                             "scale": 2,
                             "precision": 15,
                             "nullability": "NULLABILITY_NULLABLE"
                           }
                         },
                         {
                           "varchar": {
                             "length": 198,
                             "nullability": "NULLABILITY_NULLABLE"
                           }
                         }
                       ],
                       "nullability": "NULLABILITY_REQUIRED"
                     }
                   },
                   "projection": {
                     "select": {
                       "structItems": [
                         {},
                         {
                           "field": 1
                         }
                       ]
                     },
                     "maintainSingularStruct": true
                   },
                   "namedTable": {
                     "names": [
                       "partsupp"
                     ]
                   }
                 }
               },
               "expressions": [
                 {
                   "scalarFunction": {
                     "functionReference": 1,
                     "outputType": {
                       "i32": {
                         "nullability": "NULLABILITY_NULLABLE"
                       }
                     },
                     "arguments": [
                       {
                         "value": {
                           "selection": {
                             "directReference": {
                               "structField": {}
                             },
                             "rootReference": {}
                           }
                         }
                       },
                       {
                         "value": {
                           "selection": {
                             "directReference": {
                               "structField": {
                                 "field": 1
                               }
                             },
                             "rootReference": {}
                           }
                         }
                       }
                     ]
                   }
                 }
               ]
             }
           },
           "names": [
             "ADD_KEY"
           ]
         }
       }
     ]
   }
   ```


-- 
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]

Reply via email to