You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/06/18 00:59:53 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #8993: [HUDI-6391] Fix pre-commit validators based on Spark SQL

danny0405 commented on code in PR #8993:
URL: https://github.com/apache/hudi/pull/8993#discussion_r1233168533


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/validator/SparkPreCommitValidator.java:
##########
@@ -118,4 +120,11 @@ public HoodieEngineContext getEngineContext() {
   public HoodieWriteConfig getWriteConfig() {
     return this.writeConfig;
   }
+
+  protected Dataset<Row> executeSqlQuery(SQLContext sqlContext, String sqlQuery, String tableName) {
+    String queryWithTempTableName = sqlQuery.replaceAll(
+        HoodiePreCommitValidatorConfig.VALIDATOR_TABLE_VARIABLE, tableName);
+    LOG.debug("Running query: " + queryWithTempTableName);
+    return sqlContext.sql(queryWithTempTableName);

Review Comment:
   Do we need another logging, the caller already logs one message.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org