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/11/11 14:12:14 UTC
[GitHub] [iceberg] tprelle opened a new pull request #3531: Hive : BACKPORT Hive-25377 : Creating Iceberg table where some columns has omments but the last one does not fails
tprelle opened a new pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531
This PR backport https://issues.apache.org/jira/browse/HIVE-25377 for user still using Hive 2 ou 3.
--
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 #3531: Hive : BACKPORT Hive-25377 : Creating Iceberg table where some columns has omments but the last one does not fails
Posted by GitBox <gi...@apache.org>.
rdblue merged pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531
--
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 #3531: Hive : BACKPORT Hive-25377 : Creating Iceberg table where some columns has omments but the last one does not fails
Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531#issuecomment-969344844
Thanks for the fix, @tprelle!
--
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 #3531: Hive : BACKPORT Hive-25377 : Creating Iceberg table where some columns has omments but the last one does not fails
Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531#issuecomment-968345360
Running 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
[GitHub] [iceberg] tprelle commented on a change in pull request #3531: Hive : BACKPORT Hive-25377 : Creating Iceberg table where some columns has omments but the last one does not fails
Posted by GitBox <gi...@apache.org>.
tprelle commented on a change in pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531#discussion_r747730772
##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/HiveSchemaConverter.java
##########
@@ -64,7 +64,7 @@ static Type convert(TypeInfo typeInfo, boolean autoConvert) {
List<Types.NestedField> result = new ArrayList<>(names.size());
for (int i = 0; i < names.size(); ++i) {
result.add(Types.NestedField.optional(id++, names.get(i), convertType(typeInfos.get(i)),
- comments.isEmpty() ? null : comments.get(i)));
+ comments.isEmpty() || i >= comments.size() ? null : comments.get(i)));
Review comment:
fix thanks @kbendick
--
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 #3531: Hive : BACKPORT Hive-25377 : Creating Iceberg table where some columns has omments but the last one does not fails
Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531#discussion_r748894529
##########
File path: hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveSchemaUtil.java
##########
@@ -154,6 +154,22 @@ public void testComplexTypeAndTypeInfoConvert() {
}
}
+ @Test
+ public void testConversionWithoutLastComment() {
+ Schema expected = new Schema(
+ optional(0, "customer_id", Types.LongType.get(), "customer comment"),
+ optional(1, "first_name", Types.StringType.get(), null)
Review comment:
Can you please fix the formatting in this change? Continuation indents are 2 indents / 4 spaces.
--
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] tprelle commented on a change in pull request #3531: Hive : BACKPORT Hive-25377 : Creating Iceberg table where some columns has omments but the last one does not fails
Posted by GitBox <gi...@apache.org>.
tprelle commented on a change in pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531#discussion_r749332735
##########
File path: hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveSchemaUtil.java
##########
@@ -154,6 +154,22 @@ public void testComplexTypeAndTypeInfoConvert() {
}
}
+ @Test
+ public void testConversionWithoutLastComment() {
+ Schema expected = new Schema(
+ optional(0, "customer_id", Types.LongType.get(), "customer comment"),
+ optional(1, "first_name", Types.StringType.get(), null)
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] kbendick commented on a change in pull request #3531: Hive : BACKPORT Hive-25377 : Creating Iceberg table where some columns has omments but the last one does not fails
Posted by GitBox <gi...@apache.org>.
kbendick commented on a change in pull request #3531:
URL: https://github.com/apache/iceberg/pull/3531#discussion_r747699817
##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/HiveSchemaConverter.java
##########
@@ -64,7 +64,7 @@ static Type convert(TypeInfo typeInfo, boolean autoConvert) {
List<Types.NestedField> result = new ArrayList<>(names.size());
for (int i = 0; i < names.size(); ++i) {
result.add(Types.NestedField.optional(id++, names.get(i), convertType(typeInfos.get(i)),
- comments.isEmpty() ? null : comments.get(i)));
+ comments.isEmpty() || i >= comments.size() ? null : comments.get(i)));
Review comment:
Nit: Possibly add surrounding braces since this ternary is inline as an argument.
--
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