rok commented on a change in pull request #11075:
URL: https://github.com/apache/arrow/pull/11075#discussion_r703661578



##########
File path: cpp/src/arrow/compute/kernels/scalar_temporal.cc
##########
@@ -121,7 +121,7 @@ struct ZonedLocalizer {
 
 //
 // Executor class for temporal component extractors, i.e. scalar kernels
-// with the signature Timestamp -> <non-temporal scalar type `OutType`>
+// with the signature Timestamp|Date32|Date64 -> <non-temporal scalar type 
`OutType`>

Review comment:
       `temporal types` you use somewhere else sounds better than 
`Timestamp|Date32|Date64` IMO.

##########
File path: cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
##########
@@ -98,24 +136,33 @@ class ScalarTemporalTest : public ::testing::Test {
 
 namespace compute {
 
-TEST_F(ScalarTemporalTest, TestTemporalComponentExtraction) {
-  auto unit = timestamp(TimeUnit::NANO);
-  CheckScalarUnary("year", unit, times, int64(), year);
-  CheckScalarUnary("month", unit, times, int64(), month);
-  CheckScalarUnary("day", unit, times, int64(), day);
-  CheckScalarUnary("day_of_week", unit, times, int64(), day_of_week);
-  CheckScalarUnary("day_of_year", unit, times, int64(), day_of_year);
-  CheckScalarUnary("iso_year", unit, times, int64(), iso_year);
-  CheckScalarUnary("iso_week", unit, times, int64(), iso_week);
-  CheckScalarUnary("iso_calendar", ArrayFromJSON(unit, times), iso_calendar);
-  CheckScalarUnary("quarter", unit, times, int64(), quarter);
-  CheckScalarUnary("hour", unit, times, int64(), hour);
-  CheckScalarUnary("minute", unit, times, int64(), minute);
-  CheckScalarUnary("second", unit, times, int64(), second);
-  CheckScalarUnary("millisecond", unit, times, int64(), millisecond);
-  CheckScalarUnary("microsecond", unit, times, int64(), microsecond);
-  CheckScalarUnary("nanosecond", unit, times, int64(), nanosecond);
-  CheckScalarUnary("subsecond", unit, times, float64(), subsecond);
+TEST_F(ScalarTemporalTest, TestTemporalComponentExtractionAllTypes) {

Review comment:
       Maybe:
   ```suggestion
   TEST_F(ScalarTemporalTest, TestTemporalComponentExtractionAllTemporalTypes) {
   ```

##########
File path: cpp/src/arrow/compute/kernels/scalar_temporal.cc
##########
@@ -178,7 +204,7 @@ struct TemporalComponentExtractDayOfWeek
 };
 
 // ----------------------------------------------------------------------
-// Extract year from timestamp
+// Extract year from timestamp|date32|date64

Review comment:
       Same here etc.




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