Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-15032

[C++] Compute Function to return Year / Month / Day

    XMLWordPrintableJSON

Details

    Description

      Related to

      https://stackoverflow.com/questions/70194714/how-to-return-a-structarray-from-multiple-scalar-functions/70213443#70213443

       

      Right now the temporal compute functions include year / month / day as separate functions. AFAICT in the implementation these all internally create a struct containing year/month/day using the date library and then return only one of the components.

       

      From a pure efficiency perspective it might be best to just return all as one StructArray and allow the user to unpack the values. From a user perspective, I also typically want year / month / day to be bundled together, so one function call to get all three in one pass would be ideal

       

      This might be extendable down to the timestamp structure as well

      Attachments

        Issue Links

          Activity

            People

              willayd Will Ayd
              willayd Will Ayd
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h 20m
                  6h 20m