You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "westonpace (via GitHub)" <gi...@apache.org> on 2023/02/23 16:31:43 UTC

[GitHub] [arrow] westonpace commented on issue #34305: [C++] Error when running Substrait plan using `extract` function: "argument was not an enum"

westonpace commented on issue #34305:
URL: https://github.com/apache/arrow/issues/34305#issuecomment-1442078026

   Hmm, I think the `component` portion of `extract` is a "required enum argument" and not an "option":
   
   ```
       name: extract
       description: Extract portion of a date/time value.
       impls:
         - args:
             - name: component
               options: [ YEAR, MONTH, DAY, SECOND ]
               description: The part of the value to extract.
             - name: x
               value: timestamp
           return: i64
   ```
   
   So I would expect:
   
   ```
   "scalarFunction": {
                   "functionReference": 2,
                   "outputType": {
                     "i64": {
                       "nullability": "NULLABILITY_NULLABLE"
                     }
                   },
                   "arguments": [
                     {
                       "enum": "YEAR"                    
                     },
                     {
                       "value": {
                         "selection": {
                           "directReference": {
                             "structField": {
   
                             }
                           },
                           "rootReference": {
   
                           }
                         }
                       }
                     }
                   ],
                   "options": []
                 }
   ```


-- 
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: github-unsubscribe@arrow.apache.org

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