You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/25 11:16:58 UTC

[GitHub] [arrow] timvw opened a new pull request, #12982: do not return table_schema column when it's not requrested

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

   Currently, when the FlightInfo for CommandGetTables is requested, it always (hardcoded) returns a schema which includes the table_schema column (Schema.GET_TABLES_SCHEMA)  even when the table_schema is not requested (include_schema on CommandGetTables = false).
   
   


-- 
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] lidavidm commented on a diff in pull request #12982: ARROW-16311: [JAVA] do not return table_schema column when it's not requrested

Posted by GitBox <gi...@apache.org>.
lidavidm commented on code in PR #12982:
URL: https://github.com/apache/arrow/pull/12982#discussion_r857855555


##########
java/flight/flight-sql/src/test/java/org/apache/arrow/flight/sql/example/FlightSqlExample.java:
##########
@@ -1488,7 +1488,14 @@ public void getStreamSchemas(final CommandGetDbSchemas command, final CallContex
   @Override
   public FlightInfo getFlightInfoTables(final CommandGetTables request, final CallContext context,
                                         final FlightDescriptor descriptor) {
-    return getFlightInfoForSchema(request, descriptor, Schemas.GET_TABLES_SCHEMA);
+
+    Schema schemaToUse = Schemas.GET_TABLES_SCHEMA;
+
+    if (!request.getIncludeSchema()) {
+      schemaToUse = Schemas.GET_TABLES_SCHEMA_NO_SCHEMA;
+    }
+
+    return getFlightInfoForSchema(request, descriptor, schemaToUse);

Review Comment:
   nit: no need for so many newlines
   ```suggestion
       Schema schemaToUse = Schemas.GET_TABLES_SCHEMA;
       if (!request.getIncludeSchema()) {
         schemaToUse = Schemas.GET_TABLES_SCHEMA_NO_SCHEMA;
       }
   
       return getFlightInfoForSchema(request, descriptor, schemaToUse);
   ```



##########
java/flight/flight-sql/src/test/java/org/apache/arrow/flight/TestFlightSql.java:
##########
@@ -180,6 +180,14 @@ public void testGetTablesSchema() {
     collector.checkThat(info.getSchema(), is(FlightSqlProducer.Schemas.GET_TABLES_SCHEMA));
   }
 
+  @Test
+  public void testGetTablesSchemaExcludeSchema() {
+    final FlightInfo info = sqlClient.getTables(null, null, null, null, false);
+    collector.checkThat(info.getSchema(), is(FlightSqlProducer.Schemas.GET_TABLES_SCHEMA_NO_SCHEMA));
+  }
+
+
+

Review Comment:
   nit: no need for so many newlines
   ```suggestion
     public void testGetTablesSchemaExcludeSchema() {
       final FlightInfo info = sqlClient.getTables(null, null, null, null, false);
       collector.checkThat(info.getSchema(), is(FlightSqlProducer.Schemas.GET_TABLES_SCHEMA_NO_SCHEMA));
     }
   
   ```



-- 
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] github-actions[bot] commented on pull request #12982: do not return table_schema column when it's not requrested

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12982:
URL: https://github.com/apache/arrow/pull/12982#issuecomment-1108438071

   <!--
     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/master/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW
   
   Opening JIRAs 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 pull request title in the following format?
   
       ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${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


[GitHub] [arrow] ursabot commented on pull request #12982: ARROW-16311: [Java] Do not return table_schema column when it's not requested

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #12982:
URL: https://github.com/apache/arrow/pull/12982#issuecomment-1114353292

   Benchmark runs are scheduled for baseline = 3e56a949c73168d789612a9022cdceae6088e2b7 and contender = cb41e069b51d65231cd8dde8bd19ee4fcc4eb9b1. cb41e069b51d65231cd8dde8bd19ee4fcc4eb9b1 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/6d866dee69cd4a029476be90ccac10c0...345b52044c194b20a9e6146fa2093064/)
   [Finished :arrow_down:0.08% :arrow_up:0.04%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/f1f3940e825f4466934ff2b64003a3ce...f0970eb315494347bce0b328771988b7/)
   [Failed :arrow_down:12.14% :arrow_up:6.79%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/1fd49b7e01564f6a8a0a2d94d7df8a21...6eb700c493f14d62b3488c6ad6c42ce7/)
   [Finished :arrow_down:0.84% :arrow_up:0.0%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/0a85929184984ed29a833ec82982a6eb...bd2ed58c8ea44260a0ba0ea2dba2bf4d/)
   Buildkite builds:
   [Finished] [`cb41e069` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/638)
   [Finished] [`cb41e069` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/635)
   [Finished] [`cb41e069` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/626)
   [Finished] [`cb41e069` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/638)
   [Finished] [`3e56a949` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/637)
   [Finished] [`3e56a949` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/634)
   [Failed] [`3e56a949` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/580)
   [Finished] [`3e56a949` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/617)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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] lidavidm closed pull request #12982: ARROW-16311: [Java] Do not return table_schema column when it's not requested

Posted by GitBox <gi...@apache.org>.
lidavidm closed pull request #12982: ARROW-16311: [Java] Do not return table_schema column when it's not requested
URL: https://github.com/apache/arrow/pull/12982


-- 
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] timvw commented on pull request #12982: ARROW-16311: [JAVA] do not return table_schema column when it's not requrested

Posted by GitBox <gi...@apache.org>.
timvw commented on PR #12982:
URL: https://github.com/apache/arrow/pull/12982#issuecomment-1108825589

   * Added a test to assert on the schema when include_schema is set to false
   * Changed implementation to leverage existing Schemas.GET_TABLES_SCHEMA_NO_SCHEMA
   * Fixed issue with whitespace after "if" statement


-- 
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] ursabot commented on pull request #12982: ARROW-16311: [Java] Do not return table_schema column when it's not requested

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #12982:
URL: https://github.com/apache/arrow/pull/12982#issuecomment-1114353318

   ['Python', 'R'] benchmarks have high level of regressions.
   [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/1fd49b7e01564f6a8a0a2d94d7df8a21...6eb700c493f14d62b3488c6ad6c42ce7/)
   


-- 
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] github-actions[bot] commented on pull request #12982: ARROW-16311: [JAVA] do not return table_schema column when it's not requrested

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12982:
URL: https://github.com/apache/arrow/pull/12982#issuecomment-1108456049

   :warning: Ticket **has not been started in JIRA**, please click 'Start Progress'.


-- 
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] github-actions[bot] commented on pull request #12982: ARROW-16311: [JAVA] do not return table_schema column when it's not requrested

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12982:
URL: https://github.com/apache/arrow/pull/12982#issuecomment-1108456019

   https://issues.apache.org/jira/browse/ARROW-16311


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