flyrain commented on PR #4888:
URL: https://github.com/apache/iceberg/pull/4888#issuecomment-1197530335
@aokolnychyi, checked the module Spark2.4/3.0/3.1. Metadata column
`_deleted` isn't supported. For example, I've added the following tests into
class `TestSelect`.
```
@Test
public void testSelectDeletedMetaColumn() {
List<Object[]> expected = ImmutableList.of(
row(1L, "a", 1.0F), row(2L, "b", 2.0F), row(3L, "c", Float.NaN));
assertEquals("Should return all expected rows", expected, sql("SELECT *
FROM %s where _deleted=false", tableName));
expected = ImmutableList.of();
assertEquals("Should return all expected rows", expected, sql("SELECT *
FROM %s where _deleted=true", tableName));
}
```
It reports the following errors. We don't need to change anything in that
sense.
```
cannot resolve '`_deleted`' given input columns: [table.id, table.data,
table.doubleVal]; line 1 pos 26;
'Project [*]
+- 'Filter ('_deleted = false)
+- SubqueryAlias `table`
+- RelationV2 iceberg[id#12, data#13, doubleVal#14] (Options:
[path=file:/var/folders/69/j9m_r8gj69753xfnsjnlsl_m0000gn/T/junit2794346723320750539/junit3760903...)
org.apache.spark.sql.AnalysisException: cannot resolve '`_deleted`' given
input columns: [table.id, table.data, table.doubleVal]; line 1 pos 26;
'Project [*]
+- 'Filter ('_deleted = false)
+- SubqueryAlias `table`
+- RelationV2 iceberg[id#12, data#13, doubleVal#14] (Options:
[path=file:/var/folders/69/j9m_r8gj69753xfnsjnlsl_m0000gn/T/junit2794346723320750539/junit3760903...)
```
And the change I did in class `TestSparkParquetReadMetadataColumns.java`,
they are unit tests for internal classes. User cannot use them directly.
In conclusion, we are OK to leave it as is.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]