You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/11/14 09:34:37 UTC
[GitHub] [incubator-kyuubi] pan3793 opened a new pull request #1376: Implment MySQL Frontend protocol
pan3793 opened a new pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376
### _Why are the changes needed?_
Close #1219.
Implment MySQL text protocol, support basic query use mysql cli to run Spark SQL.
Test:
Add `MySQLSparkQuerySuite`.
Change `OutputSchemaTPCDSSuite` from **Thrift binary protocol** + **Delta table format** to **MySQL protocol** + **Iceberg table format**.
Limitations:
1) only support mysql_native_password authentication mechanism
2) only support MySQL text protocol
3) not support send back result which row larger than 16M
4) not support server-side prepared statement
5) not support overwrite engine_conf/session_conf via JDBC url parameters like Hive JDBC client
6) limited support MySQL metadata queries, thus some MySQL GUI client which send metadata queries implicitly may not work as expected
7) not support SSL
### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1376: Implment MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#discussion_r748828067
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/server/mysql/MySQLDialectHelper.scala
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.server.mysql
+
+import io.netty.channel.ChannelHandlerContext
+
+import org.apache.kyuubi.server.mysql.constant._
+
+object MySQLDialectHelper {
+
+ def convertQuery(origin: String): String = origin.toLowerCase.trim match {
Review comment:
A fragile approach to cover parts of metadata queries
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1376: Implment MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#discussion_r748827704
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/server/KyuubiMySQLFrontendService.scala
##########
@@ -77,7 +79,11 @@ class KyuubiMySQLFrontendService(override val serverable: Serverable)
.childHandler(new ChannelInitializer[SocketChannel] {
override def initChannel(channel: SocketChannel): Unit = channel.pipeline
.addLast(new LoggingHandler("org.apache.kyuubi.server.mysql.codec", LogLevel.TRACE))
- // TODO implement authentication, codec, command handler
+ .addLast(new MySQLFrameDelimiter)
+ .addLast(new MySQLPacketEncoder)
+ .addLast(new MySQLAuthHandler)
+ .addLast(new MySQLPacketDecoder)
+ .addLast(new MySQLCommandHandler(serverable.backendService, execPool))
Review comment:
The netty pipeline can be an entrypoint of this PR for review
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yaooqinn closed pull request #1376: Implement MySQL Frontend based on Netty
Posted by GitBox <gi...@apache.org>.
yaooqinn closed pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1376: Implment MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#discussion_r748828142
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/server/mysql/authentication/MySQLNativePassword.scala
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.server.mysql.authentication
+
+import java.util
+
+import org.apache.commons.codec.digest.DigestUtils
+
+import org.apache.kyuubi.server.mysql.authentication.MySQLAuthentication.randomBytes
+import org.apache.kyuubi.server.mysql.authentication.MySQLNativePassword.PluginData
+import org.apache.kyuubi.server.mysql.constant.MySQLErrorCode
+
+object MySQLNativePassword {
+ case class PluginData(
+ part1: Array[Byte] = randomBytes(8),
+ part2: Array[Byte] = randomBytes(12)
+ ) {
+ lazy val full: Array[Byte] = Array.concat(part1, part2)
+ }
+}
+
+class MySQLNativePassword {
+ final val pluginData = new PluginData
+
+ def login(user: String, host: String, authResp: Array[Byte], database: String):
+ Option[MySQLErrorCode] = {
+ if (isPasswordRight("kyuubi", authResp)) {
+ // if (true) {
Review comment:
hardcode now
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] pan3793 commented on pull request #1376: Implement MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
pan3793 commented on pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#issuecomment-972804548
@ulysses-you @yaooqinn would you please take a look?
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1376: Implement MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#issuecomment-968260293
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1376](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cba0e9f) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/cb9e55a9b4954584cebf5882242396fa34473126?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cb9e55a) will **increase** coverage by `15.95%`.
> The diff coverage is `47.77%`.
> :exclamation: Current head cba0e9f differs from pull request most recent head 9e0fd6e. Consider uploading reports for the commit 9e0fd6e to get more accurate results
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1376 +/- ##
=============================================
+ Coverage 59.69% 75.64% +15.95%
+ Complexity 154 110 -44
=============================================
Files 208 205 -3
Lines 10442 8634 -1808
Branches 1262 1099 -163
=============================================
+ Hits 6233 6531 +298
+ Misses 3690 1522 -2168
- Partials 519 581 +62
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/kyuubi/server/mysql/MySQLDateTimeUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxEYXRlVGltZVV0aWxzLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/kyuubi/server/mysql/MySQLField.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxGaWVsZC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [...g/apache/kyuubi/server/mysql/MySQLNullBitmap.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxOdWxsQml0bWFwLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...i/server/mysql/constant/MySQLFieldDetailFlag.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxGaWVsZERldGFpbEZsYWcuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [.../kyuubi/server/mysql/constant/MySQLErrorCode.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxFcnJvckNvZGUuc2NhbGE=) | `8.57% <8.57%> (ø)` | |
| [...server/mysql/constant/MySQLCommandPacketType.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxDb21tYW5kUGFja2V0VHlwZS5zY2FsYQ==) | `8.82% <8.82%> (ø)` | |
| [...kyuubi/server/mysql/constant/MySQLStatusFlag.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxTdGF0dXNGbGFnLnNjYWxh) | `17.64% <17.64%> (ø)` | |
| [...e/kyuubi/server/mysql/constant/MySQLDataType.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxEYXRhVHlwZS5zY2FsYQ==) | `25.21% <25.21%> (ø)` | |
| [...pache/kyuubi/server/mysql/MySQLDialectHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxEaWFsZWN0SGVscGVyLnNjYWxh) | `27.27% <27.27%> (ø)` | |
| [...ache/kyuubi/server/mysql/MySQLCommandPackets.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxDb21tYW5kUGFja2V0cy5zY2FsYQ==) | `36.36% <36.36%> (ø)` | |
| ... and [45 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cb9e55a...9e0fd6e](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1376: Implment MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#issuecomment-968260293
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1376](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cba0e9f) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/e4b8e961bb6d374d93a401c50941314173a4eadc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e4b8e96) will **decrease** coverage by `3.49%`.
> The diff coverage is `47.77%`.
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1376 +/- ##
============================================
- Coverage 79.14% 75.64% -3.50%
Complexity 110 110
============================================
Files 182 205 +23
Lines 7671 8634 +963
Branches 936 1099 +163
============================================
+ Hits 6071 6531 +460
- Misses 1093 1522 +429
- Partials 507 581 +74
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/kyuubi/server/mysql/MySQLDateTimeUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxEYXRlVGltZVV0aWxzLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/kyuubi/server/mysql/MySQLField.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxGaWVsZC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [...g/apache/kyuubi/server/mysql/MySQLNullBitmap.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxOdWxsQml0bWFwLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...i/server/mysql/constant/MySQLFieldDetailFlag.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxGaWVsZERldGFpbEZsYWcuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [.../kyuubi/server/mysql/constant/MySQLErrorCode.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxFcnJvckNvZGUuc2NhbGE=) | `8.57% <8.57%> (ø)` | |
| [...server/mysql/constant/MySQLCommandPacketType.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxDb21tYW5kUGFja2V0VHlwZS5zY2FsYQ==) | `8.82% <8.82%> (ø)` | |
| [...kyuubi/server/mysql/constant/MySQLStatusFlag.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxTdGF0dXNGbGFnLnNjYWxh) | `17.64% <17.64%> (ø)` | |
| [...e/kyuubi/server/mysql/constant/MySQLDataType.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxEYXRhVHlwZS5zY2FsYQ==) | `25.21% <25.21%> (ø)` | |
| [...pache/kyuubi/server/mysql/MySQLDialectHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxEaWFsZWN0SGVscGVyLnNjYWxh) | `27.27% <27.27%> (ø)` | |
| [...ache/kyuubi/server/mysql/MySQLCommandPackets.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxDb21tYW5kUGFja2V0cy5zY2FsYQ==) | `36.36% <36.36%> (ø)` | |
| ... and [19 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e4b8e96...cba0e9f](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yaooqinn commented on pull request #1376: Implement MySQL Frontend based on Netty
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#issuecomment-975416980
reopen to check style
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1376: Implment MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#issuecomment-968260293
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1376](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48e2107) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/e4b8e961bb6d374d93a401c50941314173a4eadc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e4b8e96) will **decrease** coverage by `3.49%`.
> The diff coverage is `47.77%`.
> :exclamation: Current head 48e2107 differs from pull request most recent head cba0e9f. Consider uploading reports for the commit cba0e9f to get more accurate results
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1376 +/- ##
============================================
- Coverage 79.14% 75.64% -3.50%
Complexity 110 110
============================================
Files 182 205 +23
Lines 7671 8634 +963
Branches 936 1099 +163
============================================
+ Hits 6071 6531 +460
- Misses 1093 1522 +429
- Partials 507 581 +74
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/kyuubi/server/mysql/MySQLDateTimeUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxEYXRlVGltZVV0aWxzLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/kyuubi/server/mysql/MySQLField.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxGaWVsZC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [...g/apache/kyuubi/server/mysql/MySQLNullBitmap.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxOdWxsQml0bWFwLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...i/server/mysql/constant/MySQLFieldDetailFlag.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxGaWVsZERldGFpbEZsYWcuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [.../kyuubi/server/mysql/constant/MySQLErrorCode.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxFcnJvckNvZGUuc2NhbGE=) | `8.57% <8.57%> (ø)` | |
| [...server/mysql/constant/MySQLCommandPacketType.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxDb21tYW5kUGFja2V0VHlwZS5zY2FsYQ==) | `8.82% <8.82%> (ø)` | |
| [...kyuubi/server/mysql/constant/MySQLStatusFlag.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxTdGF0dXNGbGFnLnNjYWxh) | `17.64% <17.64%> (ø)` | |
| [...e/kyuubi/server/mysql/constant/MySQLDataType.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxEYXRhVHlwZS5zY2FsYQ==) | `25.21% <25.21%> (ø)` | |
| [...pache/kyuubi/server/mysql/MySQLDialectHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxEaWFsZWN0SGVscGVyLnNjYWxh) | `27.27% <27.27%> (ø)` | |
| [...ache/kyuubi/server/mysql/MySQLCommandPackets.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxDb21tYW5kUGFja2V0cy5zY2FsYQ==) | `36.36% <36.36%> (ø)` | |
| ... and [19 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e4b8e96...cba0e9f](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yaooqinn commented on pull request #1376: Implement MySQL Frontend based on Netty
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#issuecomment-975416496
LGTM
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yaooqinn closed pull request #1376: Implement MySQL Frontend based on Netty
Posted by GitBox <gi...@apache.org>.
yaooqinn closed pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #1376: Implment MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#issuecomment-968260293
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1376](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48e2107) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/e4b8e961bb6d374d93a401c50941314173a4eadc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e4b8e96) will **decrease** coverage by `3.49%`.
> The diff coverage is `47.77%`.
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1376 +/- ##
============================================
- Coverage 79.14% 75.64% -3.50%
Complexity 110 110
============================================
Files 182 205 +23
Lines 7671 8634 +963
Branches 936 1099 +163
============================================
+ Hits 6071 6531 +460
- Misses 1093 1522 +429
- Partials 507 581 +74
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...pache/kyuubi/server/mysql/MySQLDateTimeUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxEYXRlVGltZVV0aWxzLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/kyuubi/server/mysql/MySQLField.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxGaWVsZC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [...g/apache/kyuubi/server/mysql/MySQLNullBitmap.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxOdWxsQml0bWFwLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...i/server/mysql/constant/MySQLFieldDetailFlag.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxGaWVsZERldGFpbEZsYWcuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [.../kyuubi/server/mysql/constant/MySQLErrorCode.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxFcnJvckNvZGUuc2NhbGE=) | `8.57% <8.57%> (ø)` | |
| [...server/mysql/constant/MySQLCommandPacketType.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxDb21tYW5kUGFja2V0VHlwZS5zY2FsYQ==) | `8.82% <8.82%> (ø)` | |
| [...kyuubi/server/mysql/constant/MySQLStatusFlag.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxTdGF0dXNGbGFnLnNjYWxh) | `17.64% <17.64%> (ø)` | |
| [...e/kyuubi/server/mysql/constant/MySQLDataType.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxEYXRhVHlwZS5zY2FsYQ==) | `25.21% <25.21%> (ø)` | |
| [...pache/kyuubi/server/mysql/MySQLDialectHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxEaWFsZWN0SGVscGVyLnNjYWxh) | `27.27% <27.27%> (ø)` | |
| [...ache/kyuubi/server/mysql/MySQLCommandPackets.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxDb21tYW5kUGFja2V0cy5zY2FsYQ==) | `36.36% <36.36%> (ø)` | |
| ... and [19 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e4b8e96...48e2107](https://codecov.io/gh/apache/incubator-kyuubi/pull/1376?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1376: Implment MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#discussion_r748827790
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/server/mysql/MySQLCommandHandler.scala
##########
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.server.mysql
+
+import java.util.concurrent.{ConcurrentHashMap, ThreadPoolExecutor}
+import java.util.concurrent.atomic.AtomicInteger
+
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success}
+
+import io.netty.channel.{ChannelHandlerContext, SimpleChannelInboundHandler}
+import org.apache.hive.service.rpc.thrift.TProtocolVersion
+
+import org.apache.kyuubi.{KyuubiSQLException, Logging}
+import org.apache.kyuubi.operation.FetchOrientation
+import org.apache.kyuubi.operation.OperationState._
+import org.apache.kyuubi.server.mysql.MySQLCommandHandler._
+import org.apache.kyuubi.server.mysql.constant.MySQLCtxAttrKey._
+import org.apache.kyuubi.service.BackendService
+import org.apache.kyuubi.session.SessionHandle
+
+object MySQLCommandHandler {
+ val connIdCounter = new AtomicInteger
+ val connIdToSessHandle = new ConcurrentHashMap[Int, SessionHandle]
+}
+
+class MySQLCommandHandler(be: BackendService, execPool: ThreadPoolExecutor)
+ extends SimpleChannelInboundHandler[MySQLCommandPacket] with Logging {
+
+ private implicit val ec: ExecutionContextExecutor = ExecutionContext.fromExecutor(execPool)
+
+ @volatile private var closed: Boolean = false
+
+ override def channelInactive(ctx: ChannelHandlerContext): Unit = {
+ closeSession(ctx)
+ super.channelInactive(ctx)
+ }
+
+ // handle process exception, generally should send error packet
+ override def exceptionCaught(ctx: ChannelHandlerContext, cause: Throwable): Unit = {
+ val connectionId = ctx.channel.attr(CONNECTION_ID).get
+ val errPacket = MySQLErrPacket(cause)
+ error(s"Connection: $connectionId, $errPacket")
+ if (ctx.channel.isActive) {
+ ctx.writeAndFlush(errPacket)
+ } else {
+ warn(s"Ignore error packet for inactivated connection: $connectionId")
+ }
+ }
+
+ override def channelRead0(ctx: ChannelHandlerContext, packet: MySQLCommandPacket): Unit = Future {
+ ensureSessionOpened(ctx)
+ packet match {
+ case pkt: MySQLComPingPacket => handlePing(ctx, pkt)
+ case pkt: MySQLComInitDbPacket => handleInitDb(ctx, pkt)
+ case pkt: MySQLComQuitPacket => handleQuit(ctx, pkt)
+ case pkt: MySQLComQueryPacket => handleQuery(ctx, pkt)
+ case bad => throw new UnsupportedOperationException(bad.getClass.getSimpleName)
+ }
+ } onComplete {
+ case Success(responsePackets) =>
+ responsePackets.foreach(ctx.channel.write)
+ ctx.channel.flush()
+ case Failure(cause) =>
+ exceptionCaught(ctx, cause)
+ }
+
+ def ensureSessionOpened(ctx: ChannelHandlerContext): Unit =
+ if (ctx.channel.attr(SESSION_HANDLE).get == null) synchronized {
+ if (ctx.channel.attr(SESSION_HANDLE).get == null) {
+ val sessionHandle = openSession(ctx)
+ ctx.channel.attr(SESSION_HANDLE).set(sessionHandle)
+ val connectionId = ctx.channel.attr(CONNECTION_ID).get
+ connIdToSessHandle.put(connectionId, sessionHandle)
+ }
+ }
+
+ def openSession(ctx: ChannelHandlerContext): SessionHandle = synchronized {
+ try {
+ val user = ctx.channel.attr(USER).get
+ val remoteIp = ctx.channel.attr(REMOTE_IP).get
+ // TODO parse SET command, save other variables at ChannelHandlerContext
+ val sessionConf = Option(ctx.channel.attr(DATABASE).get) match {
+ case Some(db) => Map("use:database" -> db)
+ case None => Map.empty[String, String]
+ }
+ // v1 is sufficient now, upgrade version when needed
+ val proto = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V1
+ val sessionHandle = be.openSession(proto, user, "", remoteIp, sessionConf)
Review comment:
Auth type of BE always be NONE
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1376: Implment MySQL Frontend protocol
Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1376:
URL: https://github.com/apache/incubator-kyuubi/pull/1376#discussion_r748827762
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/server/mysql/MySQLCommandHandler.scala
##########
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.server.mysql
+
+import java.util.concurrent.{ConcurrentHashMap, ThreadPoolExecutor}
+import java.util.concurrent.atomic.AtomicInteger
+
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success}
+
+import io.netty.channel.{ChannelHandlerContext, SimpleChannelInboundHandler}
+import org.apache.hive.service.rpc.thrift.TProtocolVersion
+
+import org.apache.kyuubi.{KyuubiSQLException, Logging}
+import org.apache.kyuubi.operation.FetchOrientation
+import org.apache.kyuubi.operation.OperationState._
+import org.apache.kyuubi.server.mysql.MySQLCommandHandler._
+import org.apache.kyuubi.server.mysql.constant.MySQLCtxAttrKey._
+import org.apache.kyuubi.service.BackendService
+import org.apache.kyuubi.session.SessionHandle
+
+object MySQLCommandHandler {
+ val connIdCounter = new AtomicInteger
+ val connIdToSessHandle = new ConcurrentHashMap[Int, SessionHandle]
+}
+
+class MySQLCommandHandler(be: BackendService, execPool: ThreadPoolExecutor)
+ extends SimpleChannelInboundHandler[MySQLCommandPacket] with Logging {
+
+ private implicit val ec: ExecutionContextExecutor = ExecutionContext.fromExecutor(execPool)
+
+ @volatile private var closed: Boolean = false
+
+ override def channelInactive(ctx: ChannelHandlerContext): Unit = {
+ closeSession(ctx)
+ super.channelInactive(ctx)
+ }
+
+ // handle process exception, generally should send error packet
+ override def exceptionCaught(ctx: ChannelHandlerContext, cause: Throwable): Unit = {
+ val connectionId = ctx.channel.attr(CONNECTION_ID).get
+ val errPacket = MySQLErrPacket(cause)
+ error(s"Connection: $connectionId, $errPacket")
+ if (ctx.channel.isActive) {
+ ctx.writeAndFlush(errPacket)
+ } else {
+ warn(s"Ignore error packet for inactivated connection: $connectionId")
+ }
+ }
+
+ override def channelRead0(ctx: ChannelHandlerContext, packet: MySQLCommandPacket): Unit = Future {
+ ensureSessionOpened(ctx)
+ packet match {
+ case pkt: MySQLComPingPacket => handlePing(ctx, pkt)
+ case pkt: MySQLComInitDbPacket => handleInitDb(ctx, pkt)
+ case pkt: MySQLComQuitPacket => handleQuit(ctx, pkt)
+ case pkt: MySQLComQueryPacket => handleQuery(ctx, pkt)
+ case bad => throw new UnsupportedOperationException(bad.getClass.getSimpleName)
+ }
+ } onComplete {
+ case Success(responsePackets) =>
+ responsePackets.foreach(ctx.channel.write)
+ ctx.channel.flush()
+ case Failure(cause) =>
+ exceptionCaught(ctx, cause)
+ }
+
+ def ensureSessionOpened(ctx: ChannelHandlerContext): Unit =
+ if (ctx.channel.attr(SESSION_HANDLE).get == null) synchronized {
+ if (ctx.channel.attr(SESSION_HANDLE).get == null) {
+ val sessionHandle = openSession(ctx)
+ ctx.channel.attr(SESSION_HANDLE).set(sessionHandle)
+ val connectionId = ctx.channel.attr(CONNECTION_ID).get
+ connIdToSessHandle.put(connectionId, sessionHandle)
+ }
+ }
+
+ def openSession(ctx: ChannelHandlerContext): SessionHandle = synchronized {
+ try {
+ val user = ctx.channel.attr(USER).get
+ val remoteIp = ctx.channel.attr(REMOTE_IP).get
+ // TODO parse SET command, save other variables at ChannelHandlerContext
Review comment:
mysql text protocol does not support pass session confs and vars when open connection
--
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@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org