ClaireLytt commented on code in PR #36492:
URL: https://github.com/apache/shardingsphere/pull/36492#discussion_r2347278564
##########
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/it/sql/dml/BaseDMLE2EIT.java:
##########
@@ -234,14 +234,23 @@ private void assertDataSet(final DataSetMetaData
expectedDataSetMetaData, final
private String generateFetchActualDataSQL(final Map<String, DataSource>
actualDataSourceMap, final DataNode dataNode, final DatabaseType databaseType)
throws SQLException {
String tableName = dataNode.getTableName();
Optional<String> primaryKeyColumnName =
DialectDatabaseAssertionMetaDataFactory.getPrimaryKeyColumnName(databaseType,
actualDataSourceMap.get(dataNode.getDataSourceName()), tableName);
- return primaryKeyColumnName.map(optional -> String.format("SELECT *
FROM %s ORDER BY %s ASC", tableName, optional)).orElseGet(() ->
String.format("SELECT * FROM %s", tableName));
+ if (primaryKeyColumnName.isPresent()) {
+ return String.format("SELECT * FROM %s ORDER BY %s ASC",
tableName, primaryKeyColumnName.get());
+ }
+ if ("Hive".equalsIgnoreCase(databaseType.getType())) {
Review Comment:
Since Hive does not support primary keys.It's different from relational
databases.
--
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]