You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/06/24 12:58:34 UTC

[GitHub] [iceberg] nastra opened a new pull request #2733: Properly format code in nessie project

nastra opened a new pull request #2733:
URL: https://github.com/apache/iceberg/pull/2733


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] nastra commented on a change in pull request #2733: Properly format code in nessie project

Posted by GitBox <gi...@apache.org>.
nastra commented on a change in pull request #2733:
URL: https://github.com/apache/iceberg/pull/2733#discussion_r663018619



##########
File path: nessie/src/test/java/org/apache/iceberg/nessie/TestBranchVisibility.java
##########
@@ -122,10 +119,11 @@ private void updateSchema(NessieCatalog catalog, TableIdentifier identifier) {
     catalog.loadTable(identifier).updateSchema().addColumn("id" + schemaCounter++, Types.LongType.get()).commit();
   }
 
-  private void testCatalogEquality(NessieCatalog catalog,
-                                   NessieCatalog compareCatalog,
-                                   boolean table1Equal,
-                                   boolean table2Equal) {
+  private void testCatalogEquality(
+      NessieCatalog catalog,
+      NessieCatalog compareCatalog,
+      boolean table1Equal,
+      boolean table2Equal) {

Review comment:
       seems like the formatter defaults to putting every single argument into a new line when **all** of them don't fit into the same line. However, if one does split up the args manually up and format the code, then the below format is valid as well. It's just that this preferrable format isn't automatically the first choice of the formatter and I'm not sure we can do anything about it atm.
   
   ```
     private void testCatalogEquality(
         NessieCatalog catalog, NessieCatalog compareCatalog, boolean table1Equal, boolean table2Equal) {
   ```




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue merged pull request #2733: Properly format code in nessie project

Posted by GitBox <gi...@apache.org>.
rdblue merged pull request #2733:
URL: https://github.com/apache/iceberg/pull/2733


   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on pull request #2733: Properly format code in nessie project

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #2733:
URL: https://github.com/apache/iceberg/pull/2733#issuecomment-874261536


   Thanks, @nastra. I'll merge this for the Nessie code since that's what you prefer and you're working on it, but we should have a larger discussion about fixing auto-formatting more broadly and see what we can do to get configs updated.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on pull request #2733: Properly format code in nessie project

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #2733:
URL: https://github.com/apache/iceberg/pull/2733#issuecomment-874261536


   Thanks, @nastra. I'll merge this for the Nessie code since that's what you prefer and you're working on it, but we should have a larger discussion about fixing auto-formatting more broadly and see what we can do to get configs updated.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue merged pull request #2733: Properly format code in nessie project

Posted by GitBox <gi...@apache.org>.
rdblue merged pull request #2733:
URL: https://github.com/apache/iceberg/pull/2733


   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #2733: Properly format code in nessie project

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #2733:
URL: https://github.com/apache/iceberg/pull/2733#discussion_r658342847



##########
File path: nessie/src/test/java/org/apache/iceberg/nessie/TestBranchVisibility.java
##########
@@ -122,10 +119,11 @@ private void updateSchema(NessieCatalog catalog, TableIdentifier identifier) {
     catalog.loadTable(identifier).updateSchema().addColumn("id" + schemaCounter++, Types.LongType.get()).commit();
   }
 
-  private void testCatalogEquality(NessieCatalog catalog,
-                                   NessieCatalog compareCatalog,
-                                   boolean table1Equal,
-                                   boolean table2Equal) {
+  private void testCatalogEquality(
+      NessieCatalog catalog,
+      NessieCatalog compareCatalog,
+      boolean table1Equal,
+      boolean table2Equal) {

Review comment:
       I think the project prefers keeping multiple arguments on a line and wrapping at the same depth as the starting argument. So there are multiple options:
   
   ```java
     private void testCatalogEquality(NessieCatalog catalog, NessieCatalog compareCatalog,
                                      boolean table1Equal, boolean table2Equal) {
   ```
   
   or,
   
   ```java
     private void testCatalogEquality(
         NessieCatalog catalog, NessieCatalog compareCatalog, boolean table1Equal, boolean table2Equal) {
   ```
   
   I think one thing that we don't usually want is one argument per line since you end up having really long argument lists. That's a problem in both cases, though.
   
   Is this something we can fix in the style config that you've applied?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] nastra commented on a change in pull request #2733: Properly format code in nessie project

Posted by GitBox <gi...@apache.org>.
nastra commented on a change in pull request #2733:
URL: https://github.com/apache/iceberg/pull/2733#discussion_r658508437



##########
File path: nessie/src/test/java/org/apache/iceberg/nessie/TestBranchVisibility.java
##########
@@ -122,10 +119,11 @@ private void updateSchema(NessieCatalog catalog, TableIdentifier identifier) {
     catalog.loadTable(identifier).updateSchema().addColumn("id" + schemaCounter++, Types.LongType.get()).commit();
   }
 
-  private void testCatalogEquality(NessieCatalog catalog,
-                                   NessieCatalog compareCatalog,
-                                   boolean table1Equal,
-                                   boolean table2Equal) {
+  private void testCatalogEquality(
+      NessieCatalog catalog,
+      NessieCatalog compareCatalog,
+      boolean table1Equal,
+      boolean table2Equal) {

Review comment:
       I don't prefer having each argument on a separate line either, but that is the result of formatting the code with `intellij-java-palantir-style.xml`. As mentioned on #2732 it would be ideal to enforce such style rules so that unformatted code doesn't make it into the project




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org