kyuubi/kyuubi-hive-jdbc
liangbowen 7b408efa33
[KYUUBI #4176] Eliminate unhelpful warning messages in Javac output of Java 11
### _Why are the changes needed?_

As #4166 cleanup unhelpful warning messages in Java 8, this PR does the same to Java 11 deprecation warnings.

- add SuppressWarnings("deprecation") to `HiveDecimal` and `FastHiveDecimalImpl`, eliminating warnings of using the deprecated field of `BigDecimal` since Java 9 in Java 11, e.g. (40 warnings in a build)

```
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/common/HiveDecimal.java:[133,50] [deprecation] ROUND_FLOOR in BigDecimal has been deprecated
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/common/HiveDecimal.java:[150,52] [deprecation] ROUND_CEILING in BigDecimal has been deprecated
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/common/HiveDecimal.java:[165,52] [deprecation] ROUND_HALF_UP in BigDecimal has been deprecated
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/common/HiveDecimal.java:[186,54] [deprecation] ROUND_HALF_EVEN in BigDecimal has been deprecated
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/common/FastHiveDecimalImpl.java:[2934,20] [deprecation] ROUND_HALF_UP in BigDecimal has been deprecated
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/common/FastHiveDecimalImpl.java:[4411,23] [deprecation] ROUND_DOWN in BigDecimal has been deprecated
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/common/FastHiveDecimalImpl.java:[4424,23] [deprecation] ROUND_UP in BigDecimal has been deprecated
```

- fix `rawtypes` usages and redundant boxing in `KyuubiCommands`
```
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiCommands.java:408:9:  [rawtypes] found raw type: Iterator
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiCommands.java:[475,71] [deprecation] Character(char) in Character has been deprecated
```

- add SuppressWarnings("deprecation") to `KyuubiBeeLine.java` for using deprecated `Class#newInstance` of Java 11

```
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiBeeLine.java:[59,18] [deprecation] newInstance() in Class has been deprecated
  where T is a type-variable:
    T extends Object declared in class Class
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiBeeLine.java:59:18:  [deprecation] newInstance() in Class has been deprecated
Warning:  /home/runner/work/kyuubi/kyuubi/kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiCommands.java:475:71:  [deprecation] Character(char) in Character has been deprecated
```

### _How was this patch tested?_
- [ ] 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/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4176 from bowenliang123/java11-warnings.

Closes #4176

d0c0640f [liangbowen] style
b26679ea [liangbowen] add @SuppressWarnings("deprecation") to HiveDecimal and FastHiveDecimalImpl and constructor of KyuubiBeeLine, remove unnecessary boxing of char in KyuubiCommands#connect, fix raw types usage in KyuubiCommands#getProperty

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2023-01-17 14:46:59 +08:00
..
src [KYUUBI #4176] Eliminate unhelpful warning messages in Javac output of Java 11 2023-01-17 14:46:59 +08:00
pom.xml [KYUUBI #3803] Improve the data interchange performance via Arrow serialization/deserialization 2022-11-28 16:07:37 +08:00
README.md [KYUUBI #3004] Clean up JDBC shaded client pom and license 2022-07-05 09:49:12 +08:00

Kyuubi Hive JDBC Module

Aiming to make a better supported client for Kyuubi and Spark

  • Add catalog to getTables meta function for DataLakes (DONE, broken in v1.3.0-incubating, fixed in v1.3.1-incubating)
  • Deploy to maven central (DONE, available since v1.3.0-incubating)
  • Create shaded jar (DONE, available since v1.4.0-incubating)
  • Remove Hive dependencies (DONE, available since v1.6.0-incubating)