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/09/22 21:05:00 UTC
[GitHub] [arrow] sgilmore10 opened a new pull request, #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
sgilmore10 opened a new pull request, #37836:
URL: https://github.com/apache/arrow/pull/37836
<!--
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
We would like to change how `arrow.tabular.Schema`s are displayed in the Command Window. Below is the current display:
```matlab
>> field1 = arrow.field("A", arrow.time32());
>> field2 = arrow.field("B", arrow.boolean());
>>s = arrow.schema([field1 field2])
s =
A: time32[s]
B: bool
```
This display is not very MATLAB-like.
### What changes are included in this PR?
1. Updated the display of `arrow.tabular.Schema`. Below is the new display:
```matlab
>> field1 = arrow.field("A", arrow.time32());
>> field2 = arrow.field("B", arrow.boolean());
>> s = arrow.schema([field1 field2])
s =
Arrow Schema with 2 fields:
A B
__________ ___________
Time32Type BooleanType
```
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
### Are these changes tested?
Yes. Added three new test cases to `tSchema.m`:
1. `TestDisplaySchemaZeroFields`
2. `TestDisplaySchemaOneField`
3. `TestDisplaySchemaMultipleFields`
### Are there any user-facing changes?
Yes. `arrow.tabular.Schema`s will be displayed differently in the Command Window.
<!--
If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
-->
<!-- **This PR includes breaking changes to public APIs.** -->
<!--
Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
-->
<!-- **This PR contains a "Critical Fix".** -->
--
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 #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #37836:
URL: https://github.com/apache/arrow/pull/37836#issuecomment-1741772104
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 00efb06dc0de9c40907576811ebb546198b7f528.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/17278918251) 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] kevingurney commented on pull request #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on PR #37836:
URL: https://github.com/apache/arrow/pull/37836#issuecomment-1736199031
I discussed this more with @sgilmore10, and we realized that the Unicode box-drawing characters don't align properly when certain Unicode characters are used. So, for now, we think it is best to go with a simpler 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] kevingurney commented on pull request #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on PR #37836:
URL: https://github.com/apache/arrow/pull/37836#issuecomment-1741441600
+1
--
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 #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on code in PR #37836:
URL: https://github.com/apache/arrow/pull/37836#discussion_r1341747269
##########
matlab/src/matlab/+arrow/+tabular/+internal/displaySchema.m:
##########
@@ -0,0 +1,50 @@
+%DISPLAYSCHEMA Generates arrow.tabular.Schema display text.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements. See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied. See the License for the specific language governing
+% permissions and limitations under the License.
+
+function text = displaySchema(schema)
+ fields = schema.Fields;
+ names = [fields.Name];
+ types = [fields.Type];
+ typeIDs = string([types.ID]);
+
+ % Use <empty> as the sentinel for field names with zero characters.
+ idx = strlength(names) == 0;
+ names(idx) = "<empty>";
+
+ if usejava("desktop")
+ % When in desktop mode, the Command Window can interpret HTML tags
+ % to display bold font and hyperlinks.
+ names = compose("<strong>%s</strong>", names);
+ classNames = arrayfun(@(type) string(class(type)), types);
+
+ % Creates a string array of with the following form:
Review Comment:
of with -> with
--
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 a diff in pull request #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on code in PR #37836:
URL: https://github.com/apache/arrow/pull/37836#discussion_r1341740011
##########
matlab/src/matlab/+arrow/+tabular/+internal/displaySchema.m:
##########
@@ -0,0 +1,41 @@
+%DISPLAYSCHEMA Generates arrow.tabular.Schema display text.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements. See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied. See the License for the specific language governing
+% permissions and limitations under the License.
+
+function text = displaySchema(schema)
+ fields = schema.Fields;
+ names = [fields.Name];
+ types = [fields.Type];
+ typeIDs = string([types.ID]);
+
+ % Use <empty> as the sentinel for field names with zero characters.
+ idx = strlength(names) == 0;
+ names(idx) = "<empty>";
+
+ if usejava("desktop")
+ % When in desktop mode, the Command Window can interpret HTML tags
+ % to display bold font and hyperlinks.
+ names = compose("<strong>%s</strong>", names);
+ classNames = arrayfun(@(type) string(class(type)), types);
+ classNameAndIDs = strings([1 numel(typeIDs) * 2]);
+ classNameAndIDs(1:2:end-1) = classNames;
+ classNameAndIDs(2:2:end) = typeIDs;
+ typeIDs = compose("<a href=""matlab:helpPopup %s"" style=""font-weight:bold"">%s</a>", classNameAndIDs);
Review Comment:
I created two issues: #37957 and #37958
--
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 #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on code in PR #37836:
URL: https://github.com/apache/arrow/pull/37836#discussion_r1341745405
##########
matlab/src/matlab/+arrow/+tabular/+internal/displaySchema.m:
##########
@@ -0,0 +1,41 @@
+%DISPLAYSCHEMA Generates arrow.tabular.Schema display text.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements. See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied. See the License for the specific language governing
+% permissions and limitations under the License.
+
+function text = displaySchema(schema)
+ fields = schema.Fields;
+ names = [fields.Name];
+ types = [fields.Type];
+ typeIDs = string([types.ID]);
+
+ % Use <empty> as the sentinel for field names with zero characters.
+ idx = strlength(names) == 0;
+ names(idx) = "<empty>";
+
+ if usejava("desktop")
+ % When in desktop mode, the Command Window can interpret HTML tags
+ % to display bold font and hyperlinks.
+ names = compose("<strong>%s</strong>", names);
+ classNames = arrayfun(@(type) string(class(type)), types);
+ classNameAndIDs = strings([1 numel(typeIDs) * 2]);
+ classNameAndIDs(1:2:end-1) = classNames;
+ classNameAndIDs(2:2:end) = typeIDs;
+ typeIDs = compose("<a href=""matlab:helpPopup %s"" style=""font-weight:bold"">%s</a>", classNameAndIDs);
Review Comment:
Thank you!
Marking as resolved.
--
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 a diff in pull request #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on code in PR #37836:
URL: https://github.com/apache/arrow/pull/37836#discussion_r1341736070
##########
matlab/src/matlab/+arrow/+tabular/+internal/displaySchema.m:
##########
@@ -0,0 +1,41 @@
+%DISPLAYSCHEMA Generates arrow.tabular.Schema display text.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements. See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied. See the License for the specific language governing
+% permissions and limitations under the License.
+
+function text = displaySchema(schema)
+ fields = schema.Fields;
+ names = [fields.Name];
+ types = [fields.Type];
+ typeIDs = string([types.ID]);
+
+ % Use <empty> as the sentinel for field names with zero characters.
+ idx = strlength(names) == 0;
+ names(idx) = "<empty>";
+
+ if usejava("desktop")
+ % When in desktop mode, the Command Window can interpret HTML tags
+ % to display bold font and hyperlinks.
+ names = compose("<strong>%s</strong>", names);
+ classNames = arrayfun(@(type) string(class(type)), types);
+ classNameAndIDs = strings([1 numel(typeIDs) * 2]);
+ classNameAndIDs(1:2:end-1) = classNames;
+ classNameAndIDs(2:2:end) = typeIDs;
+ typeIDs = compose("<a href=""matlab:helpPopup %s"" style=""font-weight:bold"">%s</a>", classNameAndIDs);
Review Comment:
I agree. We should do this in the future.
##########
matlab/src/matlab/+arrow/+tabular/+internal/displaySchema.m:
##########
@@ -0,0 +1,41 @@
+%DISPLAYSCHEMA Generates arrow.tabular.Schema display text.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements. See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied. See the License for the specific language governing
+% permissions and limitations under the License.
+
+function text = displaySchema(schema)
+ fields = schema.Fields;
+ names = [fields.Name];
+ types = [fields.Type];
+ typeIDs = string([types.ID]);
+
+ % Use <empty> as the sentinel for field names with zero characters.
+ idx = strlength(names) == 0;
+ names(idx) = "<empty>";
+
+ if usejava("desktop")
+ % When in desktop mode, the Command Window can interpret HTML tags
+ % to display bold font and hyperlinks.
+ names = compose("<strong>%s</strong>", names);
+ classNames = arrayfun(@(type) string(class(type)), types);
+ classNameAndIDs = strings([1 numel(typeIDs) * 2]);
Review Comment:
Will do.
--
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 a diff in pull request #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on code in PR #37836:
URL: https://github.com/apache/arrow/pull/37836#discussion_r1341747919
##########
matlab/src/matlab/+arrow/+tabular/+internal/displaySchema.m:
##########
@@ -0,0 +1,50 @@
+%DISPLAYSCHEMA Generates arrow.tabular.Schema display text.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements. See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied. See the License for the specific language governing
+% permissions and limitations under the License.
+
+function text = displaySchema(schema)
+ fields = schema.Fields;
+ names = [fields.Name];
+ types = [fields.Type];
+ typeIDs = string([types.ID]);
+
+ % Use <empty> as the sentinel for field names with zero characters.
+ idx = strlength(names) == 0;
+ names(idx) = "<empty>";
+
+ if usejava("desktop")
+ % When in desktop mode, the Command Window can interpret HTML tags
+ % to display bold font and hyperlinks.
+ names = compose("<strong>%s</strong>", names);
+ classNames = arrayfun(@(type) string(class(type)), types);
+
+ % Creates a string array of with the following form:
Review Comment:
oops. I'll fix that
--
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 #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on PR #37836:
URL: https://github.com/apache/arrow/pull/37836#issuecomment-1734155358
> I haven't looked at the code yet in detail, but just a thought - what if we made the display look similar to the following?
>
> ```matlab
> Arrow tabular Schema with 3 fields:
>
> ┌─────────────────┬─────────────────┬──────────────┐
> │ Name: A │ Name: B │ Name: C │
> │ Type: Time32 │ Type: Boolean │ Type: String │
> └─────────────────┴─────────────────┴──────────────┘
> ```
>
> This is just a suggestion. Let me know what you think.
I like this. It makes it clear this object is a Arrow `Schema` and not a MATLAB `table`. I can see how the original design may confuse users in that sense.
--
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 #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on code in PR #37836:
URL: https://github.com/apache/arrow/pull/37836#discussion_r1341724526
##########
matlab/src/matlab/+arrow/+tabular/+internal/displaySchema.m:
##########
@@ -0,0 +1,41 @@
+%DISPLAYSCHEMA Generates arrow.tabular.Schema display text.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements. See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied. See the License for the specific language governing
+% permissions and limitations under the License.
+
+function text = displaySchema(schema)
+ fields = schema.Fields;
+ names = [fields.Name];
+ types = [fields.Type];
+ typeIDs = string([types.ID]);
+
+ % Use <empty> as the sentinel for field names with zero characters.
+ idx = strlength(names) == 0;
+ names(idx) = "<empty>";
+
+ if usejava("desktop")
+ % When in desktop mode, the Command Window can interpret HTML tags
+ % to display bold font and hyperlinks.
+ names = compose("<strong>%s</strong>", names);
+ classNames = arrayfun(@(type) string(class(type)), types);
+ classNameAndIDs = strings([1 numel(typeIDs) * 2]);
+ classNameAndIDs(1:2:end-1) = classNames;
+ classNameAndIDs(2:2:end) = typeIDs;
+ typeIDs = compose("<a href=""matlab:helpPopup %s"" style=""font-weight:bold"">%s</a>", classNameAndIDs);
Review Comment:
Just a thought - in a future pull request, it would be helpful if we factored out the code for hyperlinking and bolding text so that we can reuse it for other displays.
##########
matlab/src/matlab/+arrow/+tabular/+internal/displaySchema.m:
##########
@@ -0,0 +1,41 @@
+%DISPLAYSCHEMA Generates arrow.tabular.Schema display text.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements. See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License. You may obtain a copy of the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied. See the License for the specific language governing
+% permissions and limitations under the License.
+
+function text = displaySchema(schema)
+ fields = schema.Fields;
+ names = [fields.Name];
+ types = [fields.Type];
+ typeIDs = string([types.ID]);
+
+ % Use <empty> as the sentinel for field names with zero characters.
+ idx = strlength(names) == 0;
+ names(idx) = "<empty>";
+
+ if usejava("desktop")
+ % When in desktop mode, the Command Window can interpret HTML tags
+ % to display bold font and hyperlinks.
+ names = compose("<strong>%s</strong>", names);
+ classNames = arrayfun(@(type) string(class(type)), types);
+ classNameAndIDs = strings([1 numel(typeIDs) * 2]);
Review Comment:
Could you add a comment explaining what these lines are doing?
--
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 pull request #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on PR #37836:
URL: https://github.com/apache/arrow/pull/37836#issuecomment-1734153453
I haven't looked at the code yet in detail, but just a thought - what if we made the display look similar to the following?
```matlab
Arrow tabular Schema with 3 fields:
┌─────────────────┬─────────────────┬──────────────┐
│ Name: A │ Name: B │ Name: C │
│ Type: Time32 │ Type: Boolean │ Type: String │
└─────────────────┴─────────────────┴──────────────┘
```
This is just a suggestion. Let me know what you think.
--
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 #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on PR #37836:
URL: https://github.com/apache/arrow/pull/37836#issuecomment-1741373890
> I discussed this more with @sgilmore10, and we realized that the Unicode box-drawing characters don't align properly when certain Unicode characters are used. So, for now, we think it is best to go with a simpler display.
Based on our discussion, I've updated the `Schema` display to the following:
```matlab
>> field1 = arrow.field("A", arrow.time32());
>> field2 = arrow.field("B", arrow.boolean());
>> s = arrow.schema([field1 field2])
s =
Arrow Schema with 2 fields:
A: Time32 | B: Boolean
```
When in desktop mode, `Schema`, `Time32`, and `Boolean` are hyperlinks to the help text for each class type.
--
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 #37836: GH-37835: [MATLAB] Improve `arrow.tabular.Schema` display
Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney merged PR #37836:
URL: https://github.com/apache/arrow/pull/37836
--
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