You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2024/04/16 21:57:06 UTC

[PR] Test: Add test to partition on field with a dot [iceberg-python]

Fokko opened a new pull request, #610:
URL: https://github.com/apache/iceberg-python/pull/610

   This is not allowed in Avro, just checking if it works.


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


Re: [PR] Test: Add test to partition on field with a dot [iceberg-python]

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


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


Re: [PR] Test: Add test to partition on field with a dot [iceberg-python]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #610:
URL: https://github.com/apache/iceberg-python/pull/610#discussion_r1579050799


##########
tests/integration/test_reads.py:
##########
@@ -473,6 +474,31 @@ def test_sanitize_character(catalog: Catalog) -> None:
     assert arrow_table.schema.names[0] == table_test_table_sanitized_character.schema().fields[0].name
 
 
+@pytest.mark.integration
+@pytest.mark.parametrize('catalog', [pytest.lazy_fixture('session_catalog_hive'), pytest.lazy_fixture('session_catalog')])
+def test_sanitize_character_partitioned(catalog: Catalog) -> None:
+    table_name = "default.test_table_partitioned_sanitized_character"
+    try:
+        catalog.drop_table(table_name)
+    except NoSuchTableError:
+        pass
+
+    tbl = catalog.create_table(
+        identifier=table_name, schema=Schema(NestedField(field_id=1, name="some.id", type=IntegerType(), required=True))
+    )

Review Comment:
   Sorry for the late reply here @HonahX. Great suggestion, I've moved the test 👍 



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


Re: [PR] Test: Add test to partition on field with a dot [iceberg-python]

Posted by "HonahX (via GitHub)" <gi...@apache.org>.
HonahX commented on code in PR #610:
URL: https://github.com/apache/iceberg-python/pull/610#discussion_r1568179853


##########
tests/integration/test_reads.py:
##########
@@ -473,6 +474,31 @@ def test_sanitize_character(catalog: Catalog) -> None:
     assert arrow_table.schema.names[0] == table_test_table_sanitized_character.schema().fields[0].name
 
 
+@pytest.mark.integration
+@pytest.mark.parametrize('catalog', [pytest.lazy_fixture('session_catalog_hive'), pytest.lazy_fixture('session_catalog')])
+def test_sanitize_character_partitioned(catalog: Catalog) -> None:
+    table_name = "default.test_table_partitioned_sanitized_character"
+    try:
+        catalog.drop_table(table_name)
+    except NoSuchTableError:
+        pass
+
+    tbl = catalog.create_table(
+        identifier=table_name, schema=Schema(NestedField(field_id=1, name="some.id", type=IntegerType(), required=True))
+    )

Review Comment:
   Seems it works! How about we move https://github.com/apache/iceberg-python/blob/35d4648f38c1ae924dbf9597d707e44f7c53225a/tests/integration/test_writes/utils.py#L62-L86
   to a place that can be shared with this test in `test_reads.py`?
   
   Alternatively, we can move this to `test_writes.py` since this test equally covers write side too.



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