You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "sgilmore10 (via GitHub)" <gi...@apache.org> on 2023/07/25 16:31:43 UTC
[GitHub] [arrow] sgilmore10 opened a new pull request, #36871: GH-36735 : Add `TimeUnit` and `TimeZone` to the `arrow.type.TimestampType` display
sgilmore10 opened a new pull request, #36871:
URL: https://github.com/apache/arrow/pull/36871
<!--
Thanks for opening a pull request!
If this is your first pull request you can find detailed information on how
to contribute here:
* [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
* [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
Then could you also rename the pull request title in the following format?
GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
or
MINOR: [${COMPONENT}] ${SUMMARY}
In the case of PARQUET issues on JIRA the title also supports:
PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
-->
### Rationale for this change
The `arrow.type.TimestampType` display should include the `TimeUnit` and `TimeZone` properties. Right now we only display the `ID` property:
```matlab
>> type = arrow.type.timestamp(TimeUnit="Second", TimeZone="America/Anchorage")
type =
TimestampType with properties:
ID: Timestamp
```
We should show the other two properties in the display.
### What changes are included in this PR?
Modified the display of `TimestampType`:
```matlab
>> type = arrow.type.timestamp(TimeUnit="Second", TimeZone="America/Anchorage")
type =
TimestampType with properties:
ID: Timestamp
TimeUnit: Second
TimeZone: "America/Anchorage"
```
Now `TimeUnit` and `TimeZone` are included.
### Are these changes tested?
Added a test case to `tTimestampType` called `Display`. It verifies `TimestampType` objects are displayed correctly in the Command Window.
### Are there any user-facing changes?
Yes, users will see the new display.
--
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
[GitHub] [arrow] kou commented on a diff in pull request #36871: GH-36735 : Add `TimeUnit` and `TimeZone` to the `arrow.type.TimestampType` display
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #36871:
URL: https://github.com/apache/arrow/pull/36871#discussion_r1274287725
##########
matlab/src/matlab/+arrow/+type/TimestampType.m:
##########
@@ -39,4 +39,11 @@
tz = obj.Proxy.timeZone();
end
end
+
+ methods (Access=protected)
+ function propgrp = getPropertyGroups(~)
+ proplist = {'ID', 'TimeUnit', 'TimeZone'};
+ propgrp = matlab.mixin.util.PropertyGroup(proplist);
Review Comment:
Can we improve naming? e.g.:
```suggestion
function groups = getPropertyGroups(~)
targets = {'ID', 'TimeUnit', 'TimeZone'};
groups = matlab.mixin.util.PropertyGroup(targets);
```
--
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
[GitHub] [arrow] kevingurney merged pull request #36871: GH-36735 : Add `TimeUnit` and `TimeZone` to the `arrow.type.TimestampType` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney merged PR #36871:
URL: https://github.com/apache/arrow/pull/36871
--
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
[GitHub] [arrow] conbench-apache-arrow[bot] commented on pull request #36871: GH-36735: [MATLAB] Add `TimeUnit` and `TimeZone` to the `arrow.type.TimestampType` display
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #36871:
URL: https://github.com/apache/arrow/pull/36871#issuecomment-1662875947
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 0513097ca311550b70ab91e7d1cbc07e3b64ba34.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/15566746687) has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them.
--
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
[GitHub] [arrow] sgilmore10 commented on pull request #36871: GH-36735 : Add `TimeUnit` and `TimeZone` to the `arrow.type.TimestampType` display
Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on PR #36871:
URL: https://github.com/apache/arrow/pull/36871#issuecomment-1650279635
I believe the CI failures are unrelated to my changes.
--
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
[GitHub] [arrow] sgilmore10 commented on pull request #36871: GH-36735 : Add `TimeUnit` and `TimeZone` to the `arrow.type.TimestampType` display
Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on PR #36871:
URL: https://github.com/apache/arrow/pull/36871#issuecomment-1652103924
Addressed feedback
--
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
[GitHub] [arrow] kevingurney commented on a diff in pull request #36871: GH-36735 : Add `TimeUnit` and `TimeZone` to the `arrow.type.TimestampType` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on code in PR #36871:
URL: https://github.com/apache/arrow/pull/36871#discussion_r1275101610
##########
matlab/src/matlab/+arrow/+type/TimestampType.m:
##########
@@ -39,4 +39,11 @@
tz = obj.Proxy.timeZone();
end
end
+
+ methods (Access=protected)
+ function groups = getPropertyGroups(~)
+ targets = {'ID', 'TimeUnit', 'TimeZone'};
Review Comment:
Can this be a `string` array rather than a `cellstr`?
##########
matlab/test/arrow/type/tTimestampType.m:
##########
@@ -105,5 +105,28 @@ function ErrorIfTimeUnitIsNonScalar(testCase)
fcn = @() arrow.type.timestamp(TimeZone=units);
testCase.verifyError(fcn, "MATLAB:validation:IncompatibleSize");
end
+
+ function Display(testCase)
+ % Verify the display of TimestampType objects.
+ %
+ % Example:
+ %
+ % TimestampType with properties:
+ %
+ % ID: Timestamp
+ % TimeUnit: Second
+ % TimeZone: "America/Anchorage"
+ %
+ type = arrow.type.timestamp(TimeUnit="Second", TimeZone="America/Anchorage"); %#ok<NASGU>
+ classnameLink = '<a href="matlab:helpPopup arrow.type.TimestampType" style="font-weight:bold">TimestampType</a>';
Review Comment:
Can this be a `string`?
--
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