dimas-b commented on code in PR #4281:
URL: https://github.com/apache/polaris/pull/4281#discussion_r3204487412


##########
runtime/service/build.gradle.kts:
##########
@@ -208,6 +206,21 @@ dependencies {
 
 tasks.named("javadoc") { dependsOn("jandex") }
 
+// MySQL is opt-in: the GPL JDBC driver (ASF Category X) is not bundled in the 
default
+// build. Enable with `-PincludeMysqlDriver=true` to run the MySQL integration 
tests.
+if (project.hasProperty("includeMysqlDriver")) {

Review Comment:
   It's a bit odd that we have to do this both in `runtime/server` and 
`runtime/service`... Would one of those places be sufficient?



##########
runtime/service/src/intTest/java/org/apache/polaris/service/it/relational/mysql/MysqlApplicationIT.java:
##########
@@ -16,19 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+package org.apache.polaris.service.it.relational.mysql;
 
-plugins {
-  id("org.kordamp.gradle.jandex")
-  id("polaris-server")
-}
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.quarkus.test.junit.TestProfile;
+import org.apache.polaris.service.it.test.PolarisApplicationIntegrationTest;
+import org.apache.polaris.test.commons.MysqlRelationalJdbcProfile;
 
-dependencies {
-  api(platform(libs.testcontainers.bom))
-  api("org.testcontainers:testcontainers")
-
-  implementation(project(":polaris-container-spec-helper"))
-  implementation(libs.guava)
-
-  compileOnly(platform(libs.junit.bom))
-  compileOnly("org.junit.jupiter:junit-jupiter-api")
-}
+@TestProfile(MysqlRelationalJdbcProfile.class)
+@QuarkusIntegrationTest
+public class MysqlApplicationIT extends PolarisApplicationIntegrationTest {}

Review Comment:
   Will these tests run only when `-PincludeMysqlDriver=true` is set?



##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/QueryGenerator.java:
##########
@@ -335,7 +336,11 @@ static QueryFragment generateWhereClauseExtended(
     List<String> conditions = new ArrayList<>();
     List<Object> parameters = new ArrayList<>();
     for (Map.Entry<String, Object> entry : whereEquals.entrySet()) {
-      conditions.add(entry.getKey() + " = ?");
+      if (entry.getValue() instanceof Converter.MysqlJsonValue) {
+        conditions.add(entry.getKey() + " = CAST(? AS JSON)");

Review Comment:
   Where do we use JSON as a "where" condition?.. just wondering 🤔 



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

Reply via email to