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/12/23 09:55:01 UTC
[GitHub] [incubator-kyuubi] hddong opened a new pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
hddong opened a new pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
Add SchemaHelper for trino engine
### _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] codecov-commenter edited a comment on pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#issuecomment-1000202932
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 [#1617](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a03220b) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/152e39401690a15f9f0a744663f8f52bfc8ee5f1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (152e394) will **increase** coverage by `0.12%`.
> The diff coverage is `97.87%`.
> :exclamation: Current head a03220b differs from pull request most recent head 3c7d907. Consider uploading reports for the commit 3c7d907 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 #1617 +/- ##
============================================
+ Coverage 58.25% 58.38% +0.12%
Complexity 164 164
============================================
Files 258 259 +1
Lines 12798 12850 +52
Branches 1608 1628 +20
============================================
+ Hits 7456 7502 +46
- Misses 4712 4717 +5
- Partials 630 631 +1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/kyuubi/engine/trino/schema/SchemaHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL3NjaGVtYS9TY2hlbWFIZWxwZXIuc2NhbGE=) | `97.87% <97.87%> (ø)` | |
| [.../apache/kyuubi/server/api/v1/ApiRootResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL0FwaVJvb3RSZXNvdXJjZS5zY2FsYQ==) | `33.33% <0.00%> (-11.12%)` | :arrow_down: |
| [...kyuubi/engine/spark/events/EngineEventsStore.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvRW5naW5lRXZlbnRzU3RvcmUuc2NhbGE=) | `86.66% <0.00%> (-10.00%)` | :arrow_down: |
| [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `83.87% <0.00%> (-2.21%)` | :arrow_down: |
| [...uubi/engine/spark/events/SparkStatementEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtTdGF0ZW1lbnRFdmVudC5zY2FsYQ==) | | |
| [...uubi/engine/spark/events/SparkOperationEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtPcGVyYXRpb25FdmVudC5zY2FsYQ==) | `88.88% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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/1617?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 [152e394...3c7d907](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#issuecomment-1000202932
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 [#1617](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3c7d907) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/152e39401690a15f9f0a744663f8f52bfc8ee5f1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (152e394) will **increase** coverage by `0.14%`.
> The diff coverage is `96.72%`.
> :exclamation: Current head 3c7d907 differs from pull request most recent head f6a03fa. Consider uploading reports for the commit f6a03fa to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 #1617 +/- ##
============================================
+ Coverage 58.25% 58.40% +0.14%
Complexity 164 164
============================================
Files 258 259 +1
Lines 12798 12864 +66
Branches 1608 1630 +22
============================================
+ Hits 7456 7513 +57
- Misses 4712 4718 +6
- Partials 630 633 +3
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/kyuubi/engine/trino/schema/SchemaHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL3NjaGVtYS9TY2hlbWFIZWxwZXIuc2NhbGE=) | `96.72% <96.72%> (ø)` | |
| [.../apache/kyuubi/server/api/v1/ApiRootResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL0FwaVJvb3RSZXNvdXJjZS5zY2FsYQ==) | `33.33% <0.00%> (-11.12%)` | :arrow_down: |
| [...kyuubi/engine/spark/events/EngineEventsStore.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvRW5naW5lRXZlbnRzU3RvcmUuc2NhbGE=) | `86.66% <0.00%> (-10.00%)` | :arrow_down: |
| [...he/kyuubi/engine/spark/repl/KyuubiSparkILoop.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9yZXBsL0t5dXViaVNwYXJrSUxvb3Auc2NhbGE=) | `90.16% <0.00%> (-3.28%)` | :arrow_down: |
| [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `83.87% <0.00%> (-2.21%)` | :arrow_down: |
| [...uubi/engine/spark/events/SparkStatementEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtTdGF0ZW1lbnRFdmVudC5zY2FsYQ==) | | |
| [...uubi/engine/spark/events/SparkOperationEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtPcGVyYXRpb25FdmVudC5zY2FsYQ==) | `88.88% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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/1617?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 [152e394...f6a03fa](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 a change in pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#discussion_r774887639
##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/schema/SchemaHelper.scala
##########
@@ -0,0 +1,116 @@
+/*
+ * 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.engine.trino.schema
+
+import java.util.Collections
+import java.util.Locale
+
+import scala.collection.JavaConverters._
+
+import io.trino.client.ClientStandardTypes._
+import io.trino.client.ClientTypeSignature
+import io.trino.client.Column
+import org.apache.hive.service.rpc.thrift.TCLIServiceConstants
+import org.apache.hive.service.rpc.thrift.TColumnDesc
+import org.apache.hive.service.rpc.thrift.TPrimitiveTypeEntry
+import org.apache.hive.service.rpc.thrift.TTableSchema
+import org.apache.hive.service.rpc.thrift.TTypeDesc
+import org.apache.hive.service.rpc.thrift.TTypeEntry
+import org.apache.hive.service.rpc.thrift.TTypeId
+import org.apache.hive.service.rpc.thrift.TTypeQualifiers
+import org.apache.hive.service.rpc.thrift.TTypeQualifierValue
+
+object SchemaHelper {
+
+ private lazy val STRING_TYPES = Array(
Review comment:
let's use set?
--
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] hddong commented on a change in pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
hddong commented on a change in pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#discussion_r774890210
##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/schema/SchemaHelper.scala
##########
@@ -0,0 +1,116 @@
+/*
+ * 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.engine.trino.schema
+
+import java.util.Collections
+import java.util.Locale
+
+import scala.collection.JavaConverters._
+
+import io.trino.client.ClientStandardTypes._
+import io.trino.client.ClientTypeSignature
+import io.trino.client.Column
+import org.apache.hive.service.rpc.thrift.TCLIServiceConstants
+import org.apache.hive.service.rpc.thrift.TColumnDesc
+import org.apache.hive.service.rpc.thrift.TPrimitiveTypeEntry
+import org.apache.hive.service.rpc.thrift.TTableSchema
+import org.apache.hive.service.rpc.thrift.TTypeDesc
+import org.apache.hive.service.rpc.thrift.TTypeEntry
+import org.apache.hive.service.rpc.thrift.TTypeId
+import org.apache.hive.service.rpc.thrift.TTypeQualifiers
+import org.apache.hive.service.rpc.thrift.TTypeQualifierValue
+
+object SchemaHelper {
+
+ private lazy val STRING_TYPES = Array(
+ HYPER_LOG_LOG,
+ QDIGEST,
+ P4_HYPER_LOG_LOG,
+ TIMESTAMP_WITH_TIME_ZONE,
+ TIME,
+ TIME_WITH_TIME_ZONE,
+ JSON,
+ IPADDRESS,
+ UUID,
+ GEOMETRY,
+ SPHERICAL_GEOGRAPHY,
+ BING_TILE)
+
+ def toTTypeId(typ: ClientTypeSignature): TTypeId = typ.getRawType.toLowerCase(Locale.ROOT) match {
+ case BOOLEAN => TTypeId.BOOLEAN_TYPE
+ case TINYINT => TTypeId.TINYINT_TYPE
+ case SMALLINT => TTypeId.SMALLINT_TYPE
+ case INTEGER => TTypeId.INT_TYPE
+ case BIGINT => TTypeId.BIGINT_TYPE
+ case REAL => TTypeId.FLOAT_TYPE
+ case DOUBLE => TTypeId.DOUBLE_TYPE
+ case DECIMAL => TTypeId.DECIMAL_TYPE
+ case CHAR => TTypeId.CHAR_TYPE
+ case VARCHAR => TTypeId.VARCHAR_TYPE
+ case VARBINARY => TTypeId.BINARY_TYPE
+ case DATE => TTypeId.DATE_TYPE
+ case TIMESTAMP => TTypeId.TIMESTAMP_TYPE
+ case INTERVAL_DAY_TO_SECOND => TTypeId.INTERVAL_DAY_TIME_TYPE
+ case INTERVAL_YEAR_TO_MONTH => TTypeId.INTERVAL_YEAR_MONTH_TYPE
+ case ARRAY => TTypeId.ARRAY_TYPE
+ case MAP => TTypeId.MAP_TYPE
+ case ROW => TTypeId.STRUCT_TYPE
+ case stringType if STRING_TYPES.contains(stringType) => TTypeId.STRING_TYPE
+ case other =>
+ throw new IllegalArgumentException(s"Unrecognized type name: $other")
Review comment:
Thanks, have addressed them.
--
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 #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#issuecomment-1000202932
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 [#1617](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a03220b) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/152e39401690a15f9f0a744663f8f52bfc8ee5f1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (152e394) will **increase** coverage by `0.12%`.
> The diff coverage is `97.87%`.
> :exclamation: Current head a03220b differs from pull request most recent head f6a03fa. Consider uploading reports for the commit f6a03fa to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 #1617 +/- ##
============================================
+ Coverage 58.25% 58.38% +0.12%
Complexity 164 164
============================================
Files 258 259 +1
Lines 12798 12850 +52
Branches 1608 1628 +20
============================================
+ Hits 7456 7502 +46
- Misses 4712 4717 +5
- Partials 630 631 +1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/kyuubi/engine/trino/schema/SchemaHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL3NjaGVtYS9TY2hlbWFIZWxwZXIuc2NhbGE=) | `97.87% <97.87%> (ø)` | |
| [.../apache/kyuubi/server/api/v1/ApiRootResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL0FwaVJvb3RSZXNvdXJjZS5zY2FsYQ==) | `33.33% <0.00%> (-11.12%)` | :arrow_down: |
| [...kyuubi/engine/spark/events/EngineEventsStore.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvRW5naW5lRXZlbnRzU3RvcmUuc2NhbGE=) | `86.66% <0.00%> (-10.00%)` | :arrow_down: |
| [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `83.87% <0.00%> (-2.21%)` | :arrow_down: |
| [...uubi/engine/spark/events/SparkStatementEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtTdGF0ZW1lbnRFdmVudC5zY2FsYQ==) | | |
| [...uubi/engine/spark/events/SparkOperationEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtPcGVyYXRpb25FdmVudC5zY2FsYQ==) | `88.88% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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/1617?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 [152e394...f6a03fa](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 a change in pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#discussion_r774888037
##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/schema/SchemaHelper.scala
##########
@@ -0,0 +1,116 @@
+/*
+ * 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.engine.trino.schema
+
+import java.util.Collections
+import java.util.Locale
+
+import scala.collection.JavaConverters._
+
+import io.trino.client.ClientStandardTypes._
+import io.trino.client.ClientTypeSignature
+import io.trino.client.Column
+import org.apache.hive.service.rpc.thrift.TCLIServiceConstants
+import org.apache.hive.service.rpc.thrift.TColumnDesc
+import org.apache.hive.service.rpc.thrift.TPrimitiveTypeEntry
+import org.apache.hive.service.rpc.thrift.TTableSchema
+import org.apache.hive.service.rpc.thrift.TTypeDesc
+import org.apache.hive.service.rpc.thrift.TTypeEntry
+import org.apache.hive.service.rpc.thrift.TTypeId
+import org.apache.hive.service.rpc.thrift.TTypeQualifiers
+import org.apache.hive.service.rpc.thrift.TTypeQualifierValue
+
+object SchemaHelper {
+
+ private lazy val STRING_TYPES = Array(
+ HYPER_LOG_LOG,
+ QDIGEST,
+ P4_HYPER_LOG_LOG,
+ TIMESTAMP_WITH_TIME_ZONE,
+ TIME,
+ TIME_WITH_TIME_ZONE,
+ JSON,
+ IPADDRESS,
+ UUID,
+ GEOMETRY,
+ SPHERICAL_GEOGRAPHY,
+ BING_TILE)
+
+ def toTTypeId(typ: ClientTypeSignature): TTypeId = typ.getRawType.toLowerCase(Locale.ROOT) match {
+ case BOOLEAN => TTypeId.BOOLEAN_TYPE
+ case TINYINT => TTypeId.TINYINT_TYPE
+ case SMALLINT => TTypeId.SMALLINT_TYPE
+ case INTEGER => TTypeId.INT_TYPE
+ case BIGINT => TTypeId.BIGINT_TYPE
+ case REAL => TTypeId.FLOAT_TYPE
+ case DOUBLE => TTypeId.DOUBLE_TYPE
+ case DECIMAL => TTypeId.DECIMAL_TYPE
+ case CHAR => TTypeId.CHAR_TYPE
+ case VARCHAR => TTypeId.VARCHAR_TYPE
+ case VARBINARY => TTypeId.BINARY_TYPE
+ case DATE => TTypeId.DATE_TYPE
+ case TIMESTAMP => TTypeId.TIMESTAMP_TYPE
+ case INTERVAL_DAY_TO_SECOND => TTypeId.INTERVAL_DAY_TIME_TYPE
+ case INTERVAL_YEAR_TO_MONTH => TTypeId.INTERVAL_YEAR_MONTH_TYPE
+ case ARRAY => TTypeId.ARRAY_TYPE
+ case MAP => TTypeId.MAP_TYPE
+ case ROW => TTypeId.STRUCT_TYPE
+ case stringType if STRING_TYPES.contains(stringType) => TTypeId.STRING_TYPE
+ case other =>
+ throw new IllegalArgumentException(s"Unrecognized type name: $other")
Review comment:
Unrecognized presto/trino data type: ?
--
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] hddong commented on a change in pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
hddong commented on a change in pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#discussion_r774885993
##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/schema/SchemaHelper.scala
##########
@@ -0,0 +1,100 @@
+/*
+ * 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.engine.trino.schema
+
+import java.util.Collections
+import java.util.Locale
+
+import scala.collection.JavaConverters._
+
+import io.trino.client.ClientStandardTypes._
+import io.trino.client.ClientTypeSignature
+import io.trino.client.Column
+import org.apache.hive.service.rpc.thrift.TCLIServiceConstants
+import org.apache.hive.service.rpc.thrift.TColumnDesc
+import org.apache.hive.service.rpc.thrift.TPrimitiveTypeEntry
+import org.apache.hive.service.rpc.thrift.TTableSchema
+import org.apache.hive.service.rpc.thrift.TTypeDesc
+import org.apache.hive.service.rpc.thrift.TTypeEntry
+import org.apache.hive.service.rpc.thrift.TTypeId
+import org.apache.hive.service.rpc.thrift.TTypeQualifiers
+import org.apache.hive.service.rpc.thrift.TTypeQualifierValue
+
+object SchemaHelper {
+
+ def toTTypeId(typ: ClientTypeSignature): TTypeId = typ.getRawType.toLowerCase(Locale.ROOT) match {
+ case BOOLEAN => TTypeId.BOOLEAN_TYPE
+ case TINYINT => TTypeId.TINYINT_TYPE
+ case SMALLINT => TTypeId.SMALLINT_TYPE
+ case INTEGER => TTypeId.INT_TYPE
+ case BIGINT => TTypeId.BIGINT_TYPE
+ case REAL => TTypeId.FLOAT_TYPE
+ case DOUBLE => TTypeId.DOUBLE_TYPE
+ case DECIMAL => TTypeId.DECIMAL_TYPE
+ case CHAR => TTypeId.CHAR_TYPE
+ case VARCHAR => TTypeId.VARCHAR_TYPE
+ case VARBINARY => TTypeId.BINARY_TYPE
+ case DATE => TTypeId.DATE_TYPE
+ case TIMESTAMP => TTypeId.TIMESTAMP_TYPE
+ case INTERVAL_DAY_TO_SECOND => TTypeId.INTERVAL_DAY_TIME_TYPE
+ case INTERVAL_YEAR_TO_MONTH => TTypeId.INTERVAL_YEAR_MONTH_TYPE
+ case ARRAY => TTypeId.ARRAY_TYPE
+ case MAP => TTypeId.MAP_TYPE
+ case ROW => TTypeId.STRUCT_TYPE
+ case _ => TTypeId.STRING_TYPE
Review comment:
Done.
--
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 #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#issuecomment-1000202932
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 [#1617](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a03220b) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/152e39401690a15f9f0a744663f8f52bfc8ee5f1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (152e394) will **increase** coverage by `0.12%`.
> The diff coverage is `97.87%`.
> :exclamation: Current head a03220b differs from pull request most recent head a8e9463. Consider uploading reports for the commit a8e9463 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 #1617 +/- ##
============================================
+ Coverage 58.25% 58.38% +0.12%
Complexity 164 164
============================================
Files 258 259 +1
Lines 12798 12850 +52
Branches 1608 1628 +20
============================================
+ Hits 7456 7502 +46
- Misses 4712 4717 +5
- Partials 630 631 +1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/kyuubi/engine/trino/schema/SchemaHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL3NjaGVtYS9TY2hlbWFIZWxwZXIuc2NhbGE=) | `97.87% <97.87%> (ø)` | |
| [.../apache/kyuubi/server/api/v1/ApiRootResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL0FwaVJvb3RSZXNvdXJjZS5zY2FsYQ==) | `33.33% <0.00%> (-11.12%)` | :arrow_down: |
| [...kyuubi/engine/spark/events/EngineEventsStore.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvRW5naW5lRXZlbnRzU3RvcmUuc2NhbGE=) | `86.66% <0.00%> (-10.00%)` | :arrow_down: |
| [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `83.87% <0.00%> (-2.21%)` | :arrow_down: |
| [...uubi/engine/spark/events/SparkStatementEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtTdGF0ZW1lbnRFdmVudC5zY2FsYQ==) | | |
| [...uubi/engine/spark/events/SparkOperationEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtPcGVyYXRpb25FdmVudC5zY2FsYQ==) | `88.88% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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/1617?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 [152e394...a8e9463](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 commented on pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#issuecomment-1000202932
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 [#1617](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a03220b) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/152e39401690a15f9f0a744663f8f52bfc8ee5f1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (152e394) will **increase** coverage by `0.12%`.
> The diff coverage is `97.87%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 #1617 +/- ##
============================================
+ Coverage 58.25% 58.38% +0.12%
Complexity 164 164
============================================
Files 258 259 +1
Lines 12798 12850 +52
Branches 1608 1628 +20
============================================
+ Hits 7456 7502 +46
- Misses 4712 4717 +5
- Partials 630 631 +1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/kyuubi/engine/trino/schema/SchemaHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL3NjaGVtYS9TY2hlbWFIZWxwZXIuc2NhbGE=) | `97.87% <97.87%> (ø)` | |
| [.../apache/kyuubi/server/api/v1/ApiRootResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL0FwaVJvb3RSZXNvdXJjZS5zY2FsYQ==) | `33.33% <0.00%> (-11.12%)` | :arrow_down: |
| [...kyuubi/engine/spark/events/EngineEventsStore.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvRW5naW5lRXZlbnRzU3RvcmUuc2NhbGE=) | `86.66% <0.00%> (-10.00%)` | :arrow_down: |
| [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `83.87% <0.00%> (-2.21%)` | :arrow_down: |
| [...uubi/engine/spark/events/SparkStatementEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtTdGF0ZW1lbnRFdmVudC5zY2FsYQ==) | | |
| [...uubi/engine/spark/events/SparkOperationEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtPcGVyYXRpb25FdmVudC5zY2FsYQ==) | `88.88% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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/1617?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 [152e394...a03220b](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 closed pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
yaooqinn closed pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617
--
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 #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#issuecomment-1000202932
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 [#1617](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f6a03fa) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/152e39401690a15f9f0a744663f8f52bfc8ee5f1?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (152e394) will **increase** coverage by `0.20%`.
> The diff coverage is `96.72%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 #1617 +/- ##
============================================
+ Coverage 58.25% 58.46% +0.20%
Complexity 164 164
============================================
Files 258 259 +1
Lines 12798 12884 +86
Branches 1608 1630 +22
============================================
+ Hits 7456 7533 +77
- Misses 4712 4718 +6
- Partials 630 633 +3
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ache/kyuubi/engine/trino/schema/SchemaHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL3NjaGVtYS9TY2hlbWFIZWxwZXIuc2NhbGE=) | `96.72% <96.72%> (ø)` | |
| [.../apache/kyuubi/server/api/v1/ApiRootResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL0FwaVJvb3RSZXNvdXJjZS5zY2FsYQ==) | `33.33% <0.00%> (-11.12%)` | :arrow_down: |
| [...kyuubi/engine/spark/events/EngineEventsStore.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvRW5naW5lRXZlbnRzU3RvcmUuc2NhbGE=) | `86.66% <0.00%> (-10.00%)` | :arrow_down: |
| [...he/kyuubi/engine/spark/repl/KyuubiSparkILoop.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9yZXBsL0t5dXViaVNwYXJrSUxvb3Auc2NhbGE=) | `90.16% <0.00%> (-3.28%)` | :arrow_down: |
| [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `83.87% <0.00%> (-2.21%)` | :arrow_down: |
| [...uubi/engine/spark/events/SparkStatementEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtTdGF0ZW1lbnRFdmVudC5zY2FsYQ==) | | |
| [...uubi/engine/spark/events/SparkOperationEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtPcGVyYXRpb25FdmVudC5zY2FsYQ==) | `88.88% <0.00%> (ø)` | |
| [.../org/apache/kyuubi/session/KyuubiSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb25JbXBsLnNjYWxh) | `84.48% <0.00%> (+0.27%)` | :arrow_up: |
| [.../org/apache/kyuubi/events/KyuubiSessionEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9ldmVudHMvS3l1dWJpU2Vzc2lvbkV2ZW50LnNjYWxh) | `92.59% <0.00%> (+0.28%)` | :arrow_up: |
| [.../apache/kyuubi/client/KyuubiSyncThriftClient.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jbGllbnQvS3l1dWJpU3luY1RocmlmdENsaWVudC5zY2FsYQ==) | `83.19% <0.00%> (+0.73%)` | :arrow_up: |
| ... and [1 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617/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/1617?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/1617?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 [152e394...f6a03fa](https://codecov.io/gh/apache/incubator-kyuubi/pull/1617?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 a change in pull request #1617: [KYUUBI #1581] Add SchemaHelper for trino engine
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1617:
URL: https://github.com/apache/incubator-kyuubi/pull/1617#discussion_r774481927
##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/schema/SchemaHelper.scala
##########
@@ -0,0 +1,100 @@
+/*
+ * 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.engine.trino.schema
+
+import java.util.Collections
+import java.util.Locale
+
+import scala.collection.JavaConverters._
+
+import io.trino.client.ClientStandardTypes._
+import io.trino.client.ClientTypeSignature
+import io.trino.client.Column
+import org.apache.hive.service.rpc.thrift.TCLIServiceConstants
+import org.apache.hive.service.rpc.thrift.TColumnDesc
+import org.apache.hive.service.rpc.thrift.TPrimitiveTypeEntry
+import org.apache.hive.service.rpc.thrift.TTableSchema
+import org.apache.hive.service.rpc.thrift.TTypeDesc
+import org.apache.hive.service.rpc.thrift.TTypeEntry
+import org.apache.hive.service.rpc.thrift.TTypeId
+import org.apache.hive.service.rpc.thrift.TTypeQualifiers
+import org.apache.hive.service.rpc.thrift.TTypeQualifierValue
+
+object SchemaHelper {
+
+ def toTTypeId(typ: ClientTypeSignature): TTypeId = typ.getRawType.toLowerCase(Locale.ROOT) match {
+ case BOOLEAN => TTypeId.BOOLEAN_TYPE
+ case TINYINT => TTypeId.TINYINT_TYPE
+ case SMALLINT => TTypeId.SMALLINT_TYPE
+ case INTEGER => TTypeId.INT_TYPE
+ case BIGINT => TTypeId.BIGINT_TYPE
+ case REAL => TTypeId.FLOAT_TYPE
+ case DOUBLE => TTypeId.DOUBLE_TYPE
+ case DECIMAL => TTypeId.DECIMAL_TYPE
+ case CHAR => TTypeId.CHAR_TYPE
+ case VARCHAR => TTypeId.VARCHAR_TYPE
+ case VARBINARY => TTypeId.BINARY_TYPE
+ case DATE => TTypeId.DATE_TYPE
+ case TIMESTAMP => TTypeId.TIMESTAMP_TYPE
+ case INTERVAL_DAY_TO_SECOND => TTypeId.INTERVAL_DAY_TIME_TYPE
+ case INTERVAL_YEAR_TO_MONTH => TTypeId.INTERVAL_YEAR_MONTH_TYPE
+ case ARRAY => TTypeId.ARRAY_TYPE
+ case MAP => TTypeId.MAP_TYPE
+ case ROW => TTypeId.STRUCT_TYPE
+ case _ => TTypeId.STRING_TYPE
Review comment:
shall we raise an error?
--
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