Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #49881

Related PR: #32743

Problem Summary:
problem before this pr:
1. null type problem
the type of NULL is null_type, this will lead to error when select this view through jdbc catalog.
```sql
mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.02 sec)

mysql> desc test_null;
+-------+-----------+------+-------+---------+-------+
| Field | Type      | Null | Key   | Default | Extra |
+-------+-----------+------+-------+---------+-------+
| col1  | null_type | Yes  | false | NULL    |       |
+-------+-----------+------+-------+---------+-------+
1 row in set (0.00 sec)
```
after this pr, the type is changed to tinyint.
mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.03 sec)
```sql
mysql> desc test_null2;
+-------+---------+------+-------+---------+-------+
| Field | Type    | Null | Key   | Default | Extra |
+-------+---------+------+-------+---------+-------+
| col1  | tinyint | Yes  | false | NULL    |       |
+-------+---------+------+-------+---------+-------+
1 row in set (0.01 sec)
```
2. nullable problem
Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation
### Release note
@github-actions github-actions bot requested a review from yiguolei as a code owner May 19, 2025 02:51
@Thearas
Copy link
Contributor

Thearas commented May 19, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this May 19, 2025
@Thearas
Copy link
Contributor

Thearas commented May 19, 2025

run buildall

@yiguolei yiguolei merged commit edb8a51 into branch-2.1 May 19, 2025
20 checks passed
@github-actions github-actions bot deleted the auto-pick-49881-branch-2.1 branch May 19, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants