You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "wangyinsheng (via GitHub)" <gi...@apache.org> on 2023/02/14 01:39:40 UTC

[GitHub] [iceberg] wangyinsheng opened a new pull request, #6831: Core: Make Iceberg version in EnvironmentContext by default

wangyinsheng opened a new pull request, #6831:
URL: https://github.com/apache/iceberg/pull/6831

   Make Iceberg version in EnvironmentContext by default


-- 
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] wangyinsheng commented on a diff in pull request #6831: Core: Make Iceberg version in EnvironmentContext by default

Posted by "wangyinsheng (via GitHub)" <gi...@apache.org>.
wangyinsheng commented on code in PR #6831:
URL: https://github.com/apache/iceberg/pull/6831#discussion_r1107251889


##########
core/src/main/java/org/apache/iceberg/EnvironmentContext.java:
##########
@@ -32,6 +32,10 @@ private EnvironmentContext() {
 
   private static final Map<String, String> PROPERTIES = Maps.newConcurrentMap();
 
+  static {
+    PROPERTIES.put("iceberg-version", IcebergBuild.fullVersion());

Review Comment:
   done



-- 
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] wangyinsheng commented on pull request #6831: Core: Make Iceberg version in EnvironmentContext by default

Posted by "wangyinsheng (via GitHub)" <gi...@apache.org>.
wangyinsheng commented on PR #6831:
URL: https://github.com/apache/iceberg/pull/6831#issuecomment-1435903566

   @rdblue PTAL


-- 
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] nastra commented on a diff in pull request #6831: Core: Make Iceberg version in EnvironmentContext by default

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #6831:
URL: https://github.com/apache/iceberg/pull/6831#discussion_r1106904865


##########
core/src/main/java/org/apache/iceberg/EnvironmentContext.java:
##########
@@ -32,6 +32,10 @@ private EnvironmentContext() {
 
   private static final Map<String, String> PROPERTIES = Maps.newConcurrentMap();
 
+  static {
+    PROPERTIES.put("iceberg-version", IcebergBuild.fullVersion());

Review Comment:
   I think it would make sense to remove `PROPERTIES.put("iceberg-version", IcebergBuild.fullVersion());` from the constructor then



##########
core/src/test/java/org/apache/iceberg/TestEnvironmentContext.java:
##########
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+package org.apache.iceberg;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class TestEnvironmentContext {
+
+  @Test
+  public void testDefaultValue() {
+    assertEquals(

Review Comment:
   ```suggestion
       Assertions.assertThat(EnvironmentContext.get().get("iceberg-version"))
           .isEqualTo(IcebergBuild.fullVersion());
   ```



-- 
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] wangyinsheng commented on pull request #6831: Core: Make Iceberg version in EnvironmentContext by default

Posted by "wangyinsheng (via GitHub)" <gi...@apache.org>.
wangyinsheng commented on PR #6831:
URL: https://github.com/apache/iceberg/pull/6831#issuecomment-1439878639

   @nastra @Fokko @rdblue  Hi, please take a look this pr,  This is an improvement on https://github.com/apache/iceberg/pull/6185  , and it's my first pr,  It's been going on for a week. Thanks a lot 


-- 
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] Fokko merged pull request #6831: Core: Make Iceberg version in EnvironmentContext by default

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


-- 
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] wangyinsheng commented on pull request #6831: Core: Make Iceberg version in EnvironmentContext by default

Posted by "wangyinsheng (via GitHub)" <gi...@apache.org>.
wangyinsheng commented on PR #6831:
URL: https://github.com/apache/iceberg/pull/6831#issuecomment-1435526469

   @Fokko PTAL


-- 
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] wangyinsheng commented on a diff in pull request #6831: Core: Make Iceberg version in EnvironmentContext by default

Posted by "wangyinsheng (via GitHub)" <gi...@apache.org>.
wangyinsheng commented on code in PR #6831:
URL: https://github.com/apache/iceberg/pull/6831#discussion_r1107251679


##########
core/src/test/java/org/apache/iceberg/TestEnvironmentContext.java:
##########
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+package org.apache.iceberg;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class TestEnvironmentContext {
+
+  @Test
+  public void testDefaultValue() {
+    assertEquals(

Review Comment:
   done



-- 
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] nastra commented on pull request #6831: Core: Make Iceberg version in EnvironmentContext by default

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on PR #6831:
URL: https://github.com/apache/iceberg/pull/6831#issuecomment-1431588400

   @Fokko could you review this one please and also kick off CI?


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