You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mysql-connector-java is ASF Category X and cannot be bundled in binary distributions. Currently it is used by MySQLSourceOperator, we should either replace this library with other libraries with good license, or we should remove it, along with the MySQLSourceOperator together
I looked into this a bit. There seem to be 2 reasonable choices for us:
The first would be to swap mysql-connector-java for an Apache-2.0 licensed MySQL client, such as the Vert.x MySQL Client (io.vertx:vertx-mysql-client) or the asyncer fork of r2dbc-mysql (io.asyncer:r2dbc-mysql). But neither uses JDBC — they're reactive clients — so adopting either would mean rewriting MySQLSourceOperator against a different API.
The second option is to keep the JDBC-based implementation but stop bundling the driver. JDBC itself is just a set of interfaces in the JDK (java.sql.*) and carries no license concerns; only the mysql-connector-java jar does. This is the approach Calcite and Flink take: they compile against the JDBC API, load the driver
dynamically at runtime, and leave it to the user to supply the jar. Concretely, on our side we'd remove the dependency from the binary distribution and replace any static reference to the driver class with a dynamic load, e.g. Class.forName("com.mysql.cj.jdbc.Driver") before opening a connection. On the user side, they would download mysql-connector-j-x.x.x.jar from MySQL themselves and drop it into Texera's classpath — for example into a lib/ folder that gets picked up at startup, or by setting -cp when launching. We'd document this in the MySQL operator's README.
Thanks for the dig. As we are releasing the docker image, which supposedly require us to provide all dependencies, my understanding is that the second path won't work for us.
In this regard I think we can go to option 1 in the long run. We don't need to be bundled with JDBC. I've never used reactive clients so not sure the difference. Is option 1 easy to try? Maybe we could ask agent to give it a try.
@pjfanning We support MySQL because some of our use cases have their data in MySQL. @bobbai00 To simplify the first release, I think we can remove MySQL support. We can revisit it in the future.
@pjfanning We support MySQL because some of our use cases have their data in MySQL. @bobbai00 To simplify the first release, I think we can remove MySQL support. We can revisit it in the fututre.
@pjfanning@chenlica Thanks for the comments. I also support removing MySQL support.
I think given the complexity, we could temporally stop supporting it for now. To simplify things, I suggest you remove only the Exec and keep the Desc, if possible, so it won't cause backward compatibility issues with workflows stored in db. For execution, simply raise an error that the executor is not available.
We need to revisit this operator in the future. Solutions discussed in this issue can be options, along with replacing it with Python implementation.
@pjfanning these are for source operators that serve as connectors of data sources. We do have Postgres source operator as well.
Activity
Yicong-Huang commentedon Apr 15, 2026
Do we have alternative libs to use?
bobbai00 commentedon Apr 17, 2026
I looked into this a bit. There seem to be 2 reasonable choices for us:
The first would be to swap
mysql-connector-javafor an Apache-2.0 licensed MySQL client, such as the Vert.x MySQL Client (io.vertx:vertx-mysql-client) or the asyncer fork of r2dbc-mysql (io.asyncer:r2dbc-mysql). But neither uses JDBC — they're reactive clients — so adopting either would mean rewritingMySQLSourceOperatoragainst a different API.The second option is to keep the JDBC-based implementation but stop bundling the driver. JDBC itself is just a set of interfaces in the JDK (
java.sql.*) and carries no license concerns; only themysql-connector-javajar does. This is the approach Calcite and Flink take: they compile against the JDBC API, load the driverdynamically at runtime, and leave it to the user to supply the jar. Concretely, on our side we'd remove the dependency from the binary distribution and replace any static reference to the driver class with a dynamic load, e.g.
Class.forName("com.mysql.cj.jdbc.Driver")before opening a connection. On the user side, they would downloadmysql-connector-j-x.x.x.jarfrom MySQL themselves and drop it into Texera's classpath — for example into alib/folder that gets picked up at startup, or by setting-cpwhen launching. We'd document this in the MySQL operator's README.Which way do you think we should go with? @Yicong-Huang @chenlica @aglinxinyuan @Xiao-zhen-Liu
Yicong-Huang commentedon Apr 17, 2026
Thanks for the dig. As we are releasing the docker image, which supposedly require us to provide all dependencies, my understanding is that the second path won't work for us.
In this regard I think we can go to option 1 in the long run. We don't need to be bundled with JDBC. I've never used reactive clients so not sure the difference. Is option 1 easy to try? Maybe we could ask agent to give it a try.
chenlica commentedon Apr 18, 2026
The second option complicates the user experience. Thus I support the first option? Is it easy to do?
pjfanning commentedon Apr 18, 2026
Why use mysql? MariaDB, Postgres and more are good OSS alternatives.
You can optionally support MySQL but it can't be mandatory.
chenlica commentedon Apr 19, 2026
@pjfanning We support MySQL because some of our use cases have their data in MySQL. @bobbai00 To simplify the first release, I think we can remove MySQL support. We can revisit it in the future.
bobbai00 commentedon Apr 19, 2026
@pjfanning @chenlica Thanks for the comments. I also support removing MySQL support.
chenlica commentedon Apr 19, 2026
I suggest we go with this plan.
bobbai00 commentedon Apr 19, 2026
@Yicong-Huang what's your opinion on this? I tried using the reactive clients (I tried https://vertx.io/docs/vertx-mysql-client/java/)to replace
mysql-connector-java, but because those clients are async, we would need to define certain buffer & poll mechanism in the operator execution.An alternative is to rewrite this operator to be a Python-based operator, using package like: https://pymysql.readthedocs.io/en/latest/ (a MIT-licensed package)
Yicong-Huang commentedon Apr 19, 2026
I think given the complexity, we could temporally stop supporting it for now. To simplify things, I suggest you remove only the Exec and keep the Desc, if possible, so it won't cause backward compatibility issues with workflows stored in db. For execution, simply raise an error that the executor is not available.
We need to revisit this operator in the future. Solutions discussed in this issue can be options, along with replacing it with Python implementation.
@pjfanning these are for source operators that serve as connectors of data sources. We do have Postgres source operator as well.
chore(dependencies): drop `mysql-connector-java` (apache#4386)
chore(dependencies): drop `mysql-connector-java` (apache#4386)