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

[PR] Gh-38541: [MATLAB] Draft: add remaining tests for arrow tabular object display [arrow]

leihou6116 opened a new pull request, #38564:
URL: https://github.com/apache/arrow/pull/38564

   ### Rationale for this change
   
   The current tests for arrow tabular display only covers basic use cases. To guarantee its quality, we need to add tests to cover more use cases.
   
   ### Are these changes tested?
   
   No.
   
   ### Are there any user-facing changes?
   
   No


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


Re: [PR] GH-38541: [MATLAB] Add remaining tests for arrow tabular object display [arrow]

Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on code in PR #38564:
URL: https://github.com/apache/arrow/pull/38564#discussion_r1380700099


##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.
+            import arrow.internal.test.display.makeLinkString
+
+            hLink1 = string('<a href="http://www.foo.com">foo</a>');
+            hLink2 = string('<a href="http://www.foo.com">another foo</a>');
+            t = table(["a";"bcd";missing;""],[hLink1;hLink2;hLink1;hLink2],[NaN;1;2;3],'VariableNames',["Description", "Link_to_doc", "Result"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+
+            % The display of schema and actual tabular data always contain 
+            % hyperlinks no matter whether hotlinks is turned on or off
+            var1Field = char(makeFieldString("Description", "String" , "arrow.type.StringType"));
+            var2Field = char(makeFieldString("Link_to_doc", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString(     "Result", "Float64", "arrow.type.Float64Type"));
+            schemaDisplay = ['    Schema:', newline, newline, ...
+                             '        ', var1Field, ' | ', var2Field, ' | ', var3Field];
+            dataDisplay   = ['    First Row:', newline, newline, ...
+                             '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null'];
+            expectedDisplayOfData = [newline, ...
+                                     '    Schema:', newline, ...
+                                     newline ...
+                                     '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                                     newline, ...
+                                     '    First Row:', newline, ...
+                                     newline, ...
+                                     '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null', newline, ...
+                                     newline];
+
+            % hotlinks is turned off
+            actualDisplay = evalc('feature(''hotlinks'',''off'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+
+            % hotlinks is turned on
+            actualDisplay = evalc('feature(''hotlinks'',''on'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+        end
+
+        function displayClassNameWhenDataIsNotArray(testCase, TabularType)
+            % When the datatype of a column is not an homogeneous array
+            % type, the class name instead of the actual data will be
+            % displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(datetime(2023,1,[1;2;3]),table([1;2;3],[4;5;6]),seconds([1;2;3]));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(3), getNumString(3));
+            var1Field = char(makeFieldString("Var1", "Timestamp" , "arrow.type.TimestampType"));
+            var2Field = char(makeFieldString("Var2", "Struct" , "arrow.type.StructType"));
+            var3Field = char(makeFieldString("Var3", "Time64", "arrow.type.Time64Type"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', '2023-01-01 00:00:00.000000 | <Struct> | 00:00:01.000000', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function displayInvalidData(testCase, TabularType)
+            % Display "null" for invalid value
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(seconds([NaN;1]), string([missing;"a"]), string(["";"b"]),  [NaN;1], datetime(2023,1,[NaN;2]),...
+                      VariableNames=["durationVar", "stringVar1", "stringVar2", "doubleVar", "datetimeVar"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(5));
+            var1Field = char(makeFieldString("durationVar", "Time64" , "arrow.type.Time64Type"));
+            var2Field = char(makeFieldString("stringVar1", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString("stringVar2", "String", "arrow.type.StringType"));
+            var4Field = char(makeFieldString("doubleVar", "Float64", "arrow.type.Float64Type"));
+            var5Field = char(makeFieldString("datetimeVar", "Timestamp", "arrow.type.TimestampType"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, ' | ', var4Field, ' | ', var5Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', 'null | null | "" | null | null', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function unicodeDisplayWell(testCase, TabularType)
+            % The current display doesn't align anything. So it should work

Review Comment:
   This is a bit confusing. I would say the current display does not vertically align multiple rows, so it should work well displaying Unicode characters.



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


Re: [PR] Gh-38541: [MATLAB] Draft: add remaining tests for arrow tabular object display [arrow]

Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on code in PR #38564:
URL: https://github.com/apache/arrow/pull/38564#discussion_r1380678678


##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)

Review Comment:
   ```suggestion
           function DataContainsHyperlink(testCase, TabularType)
   ```



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.
+            import arrow.internal.test.display.makeLinkString
+
+            hLink1 = string('<a href="http://www.foo.com">foo</a>');
+            hLink2 = string('<a href="http://www.foo.com">another foo</a>');
+            t = table(["a";"bcd";missing;""],[hLink1;hLink2;hLink1;hLink2],[NaN;1;2;3],'VariableNames',["Description", "Link_to_doc", "Result"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+
+            % The display of schema and actual tabular data always contain 

Review Comment:
   ```suggestion
               % The display of schema and actual tabular data always contains 
   ```



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.
+            import arrow.internal.test.display.makeLinkString
+
+            hLink1 = string('<a href="http://www.foo.com">foo</a>');
+            hLink2 = string('<a href="http://www.foo.com">another foo</a>');
+            t = table(["a";"bcd";missing;""],[hLink1;hLink2;hLink1;hLink2],[NaN;1;2;3],'VariableNames',["Description", "Link_to_doc", "Result"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+
+            % The display of schema and actual tabular data always contain 
+            % hyperlinks no matter whether hotlinks is turned on or off
+            var1Field = char(makeFieldString("Description", "String" , "arrow.type.StringType"));
+            var2Field = char(makeFieldString("Link_to_doc", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString(     "Result", "Float64", "arrow.type.Float64Type"));
+            schemaDisplay = ['    Schema:', newline, newline, ...
+                             '        ', var1Field, ' | ', var2Field, ' | ', var3Field];
+            dataDisplay   = ['    First Row:', newline, newline, ...
+                             '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null'];
+            expectedDisplayOfData = [newline, ...
+                                     '    Schema:', newline, ...
+                                     newline ...
+                                     '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                                     newline, ...
+                                     '    First Row:', newline, ...
+                                     newline, ...
+                                     '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null', newline, ...
+                                     newline];
+
+            % hotlinks is turned off
+            actualDisplay = evalc('feature(''hotlinks'',''off'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+
+            % hotlinks is turned on
+            actualDisplay = evalc('feature(''hotlinks'',''on'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+        end
+
+        function displayClassNameWhenDataIsNotArray(testCase, TabularType)
+            % When the datatype of a column is not an homogeneous array
+            % type, the class name instead of the actual data will be
+            % displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(datetime(2023,1,[1;2;3]),table([1;2;3],[4;5;6]),seconds([1;2;3]));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(3), getNumString(3));
+            var1Field = char(makeFieldString("Var1", "Timestamp" , "arrow.type.TimestampType"));
+            var2Field = char(makeFieldString("Var2", "Struct" , "arrow.type.StructType"));
+            var3Field = char(makeFieldString("Var3", "Time64", "arrow.type.Time64Type"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', '2023-01-01 00:00:00.000000 | <Struct> | 00:00:01.000000', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function displayInvalidData(testCase, TabularType)
+            % Display "null" for invalid value
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(seconds([NaN;1]), string([missing;"a"]), string(["";"b"]),  [NaN;1], datetime(2023,1,[NaN;2]),...
+                      VariableNames=["durationVar", "stringVar1", "stringVar2", "doubleVar", "datetimeVar"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(5));
+            var1Field = char(makeFieldString("durationVar", "Time64" , "arrow.type.Time64Type"));
+            var2Field = char(makeFieldString("stringVar1", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString("stringVar2", "String", "arrow.type.StringType"));
+            var4Field = char(makeFieldString("doubleVar", "Float64", "arrow.type.Float64Type"));
+            var5Field = char(makeFieldString("datetimeVar", "Timestamp", "arrow.type.TimestampType"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, ' | ', var4Field, ' | ', var5Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', 'null | null | "" | null | null', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function unicodeDisplayWell(testCase, TabularType)

Review Comment:
   ```suggestion
           function Unicode(testCase, TabularType)
   ```



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.
+            import arrow.internal.test.display.makeLinkString
+
+            hLink1 = string('<a href="http://www.foo.com">foo</a>');
+            hLink2 = string('<a href="http://www.foo.com">another foo</a>');
+            t = table(["a";"bcd";missing;""],[hLink1;hLink2;hLink1;hLink2],[NaN;1;2;3],'VariableNames',["Description", "Link_to_doc", "Result"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+
+            % The display of schema and actual tabular data always contain 
+            % hyperlinks no matter whether hotlinks is turned on or off
+            var1Field = char(makeFieldString("Description", "String" , "arrow.type.StringType"));
+            var2Field = char(makeFieldString("Link_to_doc", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString(     "Result", "Float64", "arrow.type.Float64Type"));
+            schemaDisplay = ['    Schema:', newline, newline, ...
+                             '        ', var1Field, ' | ', var2Field, ' | ', var3Field];
+            dataDisplay   = ['    First Row:', newline, newline, ...
+                             '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null'];
+            expectedDisplayOfData = [newline, ...
+                                     '    Schema:', newline, ...
+                                     newline ...
+                                     '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                                     newline, ...
+                                     '    First Row:', newline, ...
+                                     newline, ...
+                                     '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null', newline, ...
+                                     newline];
+
+            % hotlinks is turned off
+            actualDisplay = evalc('feature(''hotlinks'',''off'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+
+            % hotlinks is turned on
+            actualDisplay = evalc('feature(''hotlinks'',''on'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+        end
+
+        function displayClassNameWhenDataIsNotArray(testCase, TabularType)
+            % When the datatype of a column is not an homogeneous array
+            % type, the class name instead of the actual data will be
+            % displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(datetime(2023,1,[1;2;3]),table([1;2;3],[4;5;6]),seconds([1;2;3]));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(3), getNumString(3));
+            var1Field = char(makeFieldString("Var1", "Timestamp" , "arrow.type.TimestampType"));
+            var2Field = char(makeFieldString("Var2", "Struct" , "arrow.type.StructType"));
+            var3Field = char(makeFieldString("Var3", "Time64", "arrow.type.Time64Type"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', '2023-01-01 00:00:00.000000 | <Struct> | 00:00:01.000000', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function displayInvalidData(testCase, TabularType)
+            % Display "null" for invalid value
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(seconds([NaN;1]), string([missing;"a"]), string(["";"b"]),  [NaN;1], datetime(2023,1,[NaN;2]),...
+                      VariableNames=["durationVar", "stringVar1", "stringVar2", "doubleVar", "datetimeVar"]);

Review Comment:
   Indentation is off here.



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)

Review Comment:
   ```suggestion
               for i = 1:width(t)
   ```



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.
+            import arrow.internal.test.display.makeLinkString
+
+            hLink1 = string('<a href="http://www.foo.com">foo</a>');
+            hLink2 = string('<a href="http://www.foo.com">another foo</a>');
+            t = table(["a";"bcd";missing;""],[hLink1;hLink2;hLink1;hLink2],[NaN;1;2;3],'VariableNames',["Description", "Link_to_doc", "Result"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+
+            % The display of schema and actual tabular data always contain 
+            % hyperlinks no matter whether hotlinks is turned on or off
+            var1Field = char(makeFieldString("Description", "String" , "arrow.type.StringType"));
+            var2Field = char(makeFieldString("Link_to_doc", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString(     "Result", "Float64", "arrow.type.Float64Type"));
+            schemaDisplay = ['    Schema:', newline, newline, ...
+                             '        ', var1Field, ' | ', var2Field, ' | ', var3Field];
+            dataDisplay   = ['    First Row:', newline, newline, ...
+                             '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null'];
+            expectedDisplayOfData = [newline, ...
+                                     '    Schema:', newline, ...
+                                     newline ...
+                                     '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                                     newline, ...
+                                     '    First Row:', newline, ...
+                                     newline, ...
+                                     '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null', newline, ...
+                                     newline];
+
+            % hotlinks is turned off
+            actualDisplay = evalc('feature(''hotlinks'',''off'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+
+            % hotlinks is turned on
+            actualDisplay = evalc('feature(''hotlinks'',''on'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+        end
+
+        function displayClassNameWhenDataIsNotArray(testCase, TabularType)
+            % When the datatype of a column is not an homogeneous array

Review Comment:
   ```suggestion
               % When the datatype of a column is not a homogeneous array
   ```



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.
+            import arrow.internal.test.display.makeLinkString
+
+            hLink1 = string('<a href="http://www.foo.com">foo</a>');
+            hLink2 = string('<a href="http://www.foo.com">another foo</a>');
+            t = table(["a";"bcd";missing;""],[hLink1;hLink2;hLink1;hLink2],[NaN;1;2;3],'VariableNames',["Description", "Link_to_doc", "Result"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+
+            % The display of schema and actual tabular data always contain 
+            % hyperlinks no matter whether hotlinks is turned on or off
+            var1Field = char(makeFieldString("Description", "String" , "arrow.type.StringType"));
+            var2Field = char(makeFieldString("Link_to_doc", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString(     "Result", "Float64", "arrow.type.Float64Type"));
+            schemaDisplay = ['    Schema:', newline, newline, ...
+                             '        ', var1Field, ' | ', var2Field, ' | ', var3Field];
+            dataDisplay   = ['    First Row:', newline, newline, ...
+                             '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null'];
+            expectedDisplayOfData = [newline, ...
+                                     '    Schema:', newline, ...
+                                     newline ...
+                                     '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                                     newline, ...
+                                     '    First Row:', newline, ...
+                                     newline, ...
+                                     '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null', newline, ...
+                                     newline];
+
+            % hotlinks is turned off
+            actualDisplay = evalc('feature(''hotlinks'',''off'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+
+            % hotlinks is turned on
+            actualDisplay = evalc('feature(''hotlinks'',''on'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+        end
+
+        function displayClassNameWhenDataIsNotArray(testCase, TabularType)
+            % When the datatype of a column is not an homogeneous array
+            % type, the class name instead of the actual data will be
+            % displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(datetime(2023,1,[1;2;3]),table([1;2;3],[4;5;6]),seconds([1;2;3]));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(3), getNumString(3));
+            var1Field = char(makeFieldString("Var1", "Timestamp" , "arrow.type.TimestampType"));
+            var2Field = char(makeFieldString("Var2", "Struct" , "arrow.type.StructType"));
+            var3Field = char(makeFieldString("Var3", "Time64", "arrow.type.Time64Type"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', '2023-01-01 00:00:00.000000 | <Struct> | 00:00:01.000000', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function displayInvalidData(testCase, TabularType)
+            % Display "null" for invalid value

Review Comment:
   For consistency with the other test cases, could you start the test case comments with something like "Verify that..."



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)

Review Comment:
   Could you please use `UpperCamelCase` for the test names to follow the convention used in this file?



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.
+            import arrow.internal.test.display.makeLinkString
+
+            hLink1 = string('<a href="http://www.foo.com">foo</a>');
+            hLink2 = string('<a href="http://www.foo.com">another foo</a>');
+            t = table(["a";"bcd";missing;""],[hLink1;hLink2;hLink1;hLink2],[NaN;1;2;3],'VariableNames',["Description", "Link_to_doc", "Result"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+
+            % The display of schema and actual tabular data always contain 
+            % hyperlinks no matter whether hotlinks is turned on or off
+            var1Field = char(makeFieldString("Description", "String" , "arrow.type.StringType"));
+            var2Field = char(makeFieldString("Link_to_doc", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString(     "Result", "Float64", "arrow.type.Float64Type"));
+            schemaDisplay = ['    Schema:', newline, newline, ...
+                             '        ', var1Field, ' | ', var2Field, ' | ', var3Field];
+            dataDisplay   = ['    First Row:', newline, newline, ...
+                             '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null'];
+            expectedDisplayOfData = [newline, ...
+                                     '    Schema:', newline, ...
+                                     newline ...
+                                     '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                                     newline, ...
+                                     '    First Row:', newline, ...
+                                     newline, ...
+                                     '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null', newline, ...
+                                     newline];
+
+            % hotlinks is turned off
+            actualDisplay = evalc('feature(''hotlinks'',''off'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+
+            % hotlinks is turned on
+            actualDisplay = evalc('feature(''hotlinks'',''on'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+        end
+
+        function displayClassNameWhenDataIsNotArray(testCase, TabularType)
+            % When the datatype of a column is not an homogeneous array
+            % type, the class name instead of the actual data will be
+            % displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(datetime(2023,1,[1;2;3]),table([1;2;3],[4;5;6]),seconds([1;2;3]));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(3), getNumString(3));
+            var1Field = char(makeFieldString("Var1", "Timestamp" , "arrow.type.TimestampType"));
+            var2Field = char(makeFieldString("Var2", "Struct" , "arrow.type.StructType"));
+            var3Field = char(makeFieldString("Var3", "Time64", "arrow.type.Time64Type"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', '2023-01-01 00:00:00.000000 | <Struct> | 00:00:01.000000', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function displayInvalidData(testCase, TabularType)
+            % Display "null" for invalid value
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(seconds([NaN;1]), string([missing;"a"]), string(["";"b"]),  [NaN;1], datetime(2023,1,[NaN;2]),...
+                      VariableNames=["durationVar", "stringVar1", "stringVar2", "doubleVar", "datetimeVar"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(5));
+            var1Field = char(makeFieldString("durationVar", "Time64" , "arrow.type.Time64Type"));
+            var2Field = char(makeFieldString("stringVar1", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString("stringVar2", "String", "arrow.type.StringType"));
+            var4Field = char(makeFieldString("doubleVar", "Float64", "arrow.type.Float64Type"));
+            var5Field = char(makeFieldString("datetimeVar", "Timestamp", "arrow.type.TimestampType"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, ' | ', var4Field, ' | ', var5Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', 'null | null | "" | null | null', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function unicodeDisplayWell(testCase, TabularType)
+            % The current display doesn't align anything. So it should work
+            % well with displaying unicode.

Review Comment:
   ```suggestion
               % well with displaying Unicode characters.
   ```



##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.

Review Comment:
   ```suggestion
               % containing hyperlink is not impacted and is displayed as expected.
   ```



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


Re: [PR] Gh-38541: [MATLAB] Draft: add remaining tests for arrow tabular object display [arrow]

Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on PR #38564:
URL: https://github.com/apache/arrow/pull/38564#issuecomment-1791418897

   @leihou6116 - could you please update the description of this pull request to describe what tests are being added?


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


Re: [PR] GH-38541: [MATLAB] Add remaining tests for arrow tabular object display [arrow]

Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on code in PR #38564:
URL: https://github.com/apache/arrow/pull/38564#discussion_r1380692296


##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -76,6 +76,34 @@ function ZeroRowsOneColumn(testCase, TabularType)
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
 
+        function zeroRowsMultipleColumns(testCase, TabularType)
+            % Test the display of 0xN arrow tabular object.

Review Comment:
   Missing an "a" between "of" and "0xN" -> "of a 0xN"



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


Re: [PR] GH-38541: [MATLAB] Add remaining tests for arrow tabular object display [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #38564:
URL: https://github.com/apache/arrow/pull/38564#issuecomment-1791816479

   After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 1749e00ff4fc39816f4226f9b328198838049da5.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/18323673419) has more details. It also includes information about 1 possible false positive 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


Re: [PR] GH-38541: [MATLAB] Add remaining tests for arrow tabular object display [arrow]

Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney merged PR #38564:
URL: https://github.com/apache/arrow/pull/38564


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


Re: [PR] Gh-38541: [MATLAB] Draft: add remaining tests for arrow tabular object display [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38564:
URL: https://github.com/apache/arrow/pull/38564#issuecomment-1791402209

   <!--
     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.
   -->
   
   Thanks for opening a pull request!
   
   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}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
   


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


Re: [PR] GH-38541: [MATLAB] Add remaining tests for arrow tabular object display [arrow]

Posted by "kevingurney (via GitHub)" <gi...@apache.org>.
kevingurney commented on code in PR #38564:
URL: https://github.com/apache/arrow/pull/38564#discussion_r1380715168


##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -224,10 +227,10 @@ function dataContainHyperlink(testCase, TabularType)
             testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
         end
 
-        function displayClassNameWhenDataIsNotArray(testCase, TabularType)
-            % When the datatype of a column is not an homogeneous array
-            % type, the class name instead of the actual data will be
-            % displayed.
+        function DisplayClassNameWhenDataIsNotArray(testCase, TabularType)
+            % Verify that the class name instead of the actual data will be
+            % displayed when the datatype of a tabular variable is not a 
+            % homogeneous array type.

Review Comment:
   ```suggestion
               % nested array type (e.g. StructArray or ListArray)
   ```



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


Re: [PR] GH-38541: [MATLAB] Add remaining tests for arrow tabular object display [arrow]

Posted by "sgilmore10 (via GitHub)" <gi...@apache.org>.
sgilmore10 commented on code in PR #38564:
URL: https://github.com/apache/arrow/pull/38564#discussion_r1380700099


##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)
+            % Test tabular object that is wider than the MATLAB Command
+            % Window. In this case, all variables are still displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = array2table([1:100;101:200],VariableNames="x"+(1:100));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(100));
+            schemaDisplay = ['    Schema:', newline, newline, '        '];
+            dataDisplay   = ['    First Row:', newline, newline, '        '];
+            for i = 1 : width(t)
+                if i < width(t)
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type")), ' | '];
+                    dataDisplay = [dataDisplay, num2str(i), ' | '];
+                else
+                    schemaDisplay = [schemaDisplay, char(makeFieldString("x"+i, "Float64", "arrow.type.Float64Type"))];
+                    dataDisplay = [dataDisplay, num2str(i)];
+                end
+            end
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               schemaDisplay, newline, ...
+                               newline ...
+                               dataDisplay, newline, ...
+                               newline];
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function dataContainHyperlink(testCase, TabularType)
+            % No matter whether hotlinks is turned on or off, the data text
+            % containing hyperlink is not impacted and is displayed well.
+            import arrow.internal.test.display.makeLinkString
+
+            hLink1 = string('<a href="http://www.foo.com">foo</a>');
+            hLink2 = string('<a href="http://www.foo.com">another foo</a>');
+            t = table(["a";"bcd";missing;""],[hLink1;hLink2;hLink1;hLink2],[NaN;1;2;3],'VariableNames',["Description", "Link_to_doc", "Result"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+
+            % The display of schema and actual tabular data always contain 
+            % hyperlinks no matter whether hotlinks is turned on or off
+            var1Field = char(makeFieldString("Description", "String" , "arrow.type.StringType"));
+            var2Field = char(makeFieldString("Link_to_doc", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString(     "Result", "Float64", "arrow.type.Float64Type"));
+            schemaDisplay = ['    Schema:', newline, newline, ...
+                             '        ', var1Field, ' | ', var2Field, ' | ', var3Field];
+            dataDisplay   = ['    First Row:', newline, newline, ...
+                             '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null'];
+            expectedDisplayOfData = [newline, ...
+                                     '    Schema:', newline, ...
+                                     newline ...
+                                     '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                                     newline, ...
+                                     '    First Row:', newline, ...
+                                     newline, ...
+                                     '        ', '"a"', ' | ', '"', '<a href="http://www.foo.com">foo</a>', '"', ' | ', 'null', newline, ...
+                                     newline];
+
+            % hotlinks is turned off
+            actualDisplay = evalc('feature(''hotlinks'',''off'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+
+            % hotlinks is turned on
+            actualDisplay = evalc('feature(''hotlinks'',''on'');disp(arrowTabularObj)');
+            testCase.verifySubstring(actualDisplay, expectedDisplayOfData);
+        end
+
+        function displayClassNameWhenDataIsNotArray(testCase, TabularType)
+            % When the datatype of a column is not an homogeneous array
+            % type, the class name instead of the actual data will be
+            % displayed.
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(datetime(2023,1,[1;2;3]),table([1;2;3],[4;5;6]),seconds([1;2;3]));
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(3), getNumString(3));
+            var1Field = char(makeFieldString("Var1", "Timestamp" , "arrow.type.TimestampType"));
+            var2Field = char(makeFieldString("Var2", "Struct" , "arrow.type.StructType"));
+            var3Field = char(makeFieldString("Var3", "Time64", "arrow.type.Time64Type"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', '2023-01-01 00:00:00.000000 | <Struct> | 00:00:01.000000', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function displayInvalidData(testCase, TabularType)
+            % Display "null" for invalid value
+            import arrow.internal.test.display.makeLinkString
+
+            t = table(seconds([NaN;1]), string([missing;"a"]), string(["";"b"]),  [NaN;1], datetime(2023,1,[NaN;2]),...
+                      VariableNames=["durationVar", "stringVar1", "stringVar2", "doubleVar", "datetimeVar"]);
+            arrowTabularObj = TabularType.FromTableFcn(t);
+            actualDisplay = evalc('disp(arrowTabularObj)');
+
+            classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
+                ClassName=TabularType.ClassName, BoldFont=true);
+            header = compose("  Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(5));
+            var1Field = char(makeFieldString("durationVar", "Time64" , "arrow.type.Time64Type"));
+            var2Field = char(makeFieldString("stringVar1", "String" , "arrow.type.StringType"));
+            var3Field = char(makeFieldString("stringVar2", "String", "arrow.type.StringType"));
+            var4Field = char(makeFieldString("doubleVar", "Float64", "arrow.type.Float64Type"));
+            var5Field = char(makeFieldString("datetimeVar", "Timestamp", "arrow.type.TimestampType"));
+            expectedDisplay = [char(header), newline, ...
+                               newline, ...
+                               '    Schema:', newline, ...
+                               newline, ...
+                               '        ', var1Field, ' | ', var2Field, ' | ', var3Field, ' | ', var4Field, ' | ', var5Field, newline, ...
+                               newline, ...
+                               '    First Row:', newline, ...
+                               newline, ...
+                               '        ', 'null | null | "" | null | null', newline,...
+                               newline];
+
+            testCase.verifyEqual(actualDisplay, expectedDisplay);
+        end
+
+        function unicodeDisplayWell(testCase, TabularType)
+            % The current display doesn't align anything. So it should work

Review Comment:
   This is a bit confusing. I would say the current display does not attempt to align multiple rows vertically. Therefore, it should work well displaying Unicode characters.



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


Re: [PR] GH-38541: [MATLAB] Add remaining tests for arrow tabular object display [arrow]

Posted by "leihou6116 (via GitHub)" <gi...@apache.org>.
leihou6116 commented on code in PR #38564:
URL: https://github.com/apache/arrow/pull/38564#discussion_r1380690819


##########
matlab/test/arrow/tabular/tTabularDisplay.m:
##########
@@ -124,6 +153,167 @@ function ManyRowsAndColumns(testCase, TabularType)
 
             testCase.verifyEqual(actualDisplay, expectedDisplay);
         end
+
+        function veryWideTabular(testCase, TabularType)

Review Comment:
   Good catch. Thank you. I'll update the test method name to follow the convention.



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