nastra commented on code in PR #11993:
URL: https://github.com/apache/iceberg/pull/11993#discussion_r1923260043
##########
spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestViews.java:
##########
@@ -213,10 +213,13 @@ public void readFromViewUsingNonExistingTable() throws
NoSuchTableException {
assertThatThrownBy(() -> sql("SELECT * FROM %s", viewName))
.isInstanceOf(AnalysisException.class)
- .hasMessageContaining(
Review Comment:
If we really only care about the error class, then an alternative check
could be the one below:
```
assertThatThrownBy(() -> sql("SELECT * FROM %s", viewName))
.isInstanceOf(AnalysisException.class)
.hasMessageContaining(
String.format(
"The table or view `%s`.`%s`.`non_existing` cannot be found",
catalogName, NAMESPACE))
.asInstanceOf(InstanceOfAssertFactories.type(AnalysisException.class))
.extracting(AnalysisException::getErrorClass)
.isEqualTo("INVALID_VIEW_TEXT");
```
--
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]