Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature](jdbc catalog) support gbase jdbc catalog #41027 #41587 #42123

Conversation

morningman
Copy link
Contributor

@morningman morningman commented Oct 18, 2024

cherry pick from #41027 #41587

## TEST

### Version

- Gbase: GBase8a_MPP_Cluster-NoLicense-FREE-9.5.3.28.12-redhat7-x86_64
- Gbase Jdbc Driver: gbase-connector-java-9.5.0.7-build1-bin.jar

### Meta And Data

```
Doris > CREATE CATALOG `gbase` PROPERTIES (
    -> "user" = "root",
    -> "type" = "jdbc",
    -> "password" = "",
    -> "jdbc_url" = "jdbc:gbase://127.0.0.1:5258/doris_test",
    -> "driver_url" = "gbase-connector-java-9.5.0.7-build1-bin.jar",
    -> "driver_class" = "com.gbase.jdbc.Driver"
    -> );
Query OK, 0 rows affected (0.47 sec)

Doris > show databases from gbase;
+--------------------+
| Database           |
+--------------------+
| doris_test         |
| gbase              |
| gclusterdb         |
| gctmpdb            |
| information_schema |
| mysql              |
+--------------------+
6 rows in set (0.23 sec)

Doris > show tables from gbase.doris_test;
+----------------------+
| Tables_in_doris_test |
+----------------------+
| gbase_test           |
| pt1                  |
| pt2                  |
| pt3                  |
| pt4                  |
+----------------------+
5 rows in set (0.03 sec)

Doris > desc gbase.doris_test.gbase_test;
+---------------+---------------+------+------+---------+-------+
| Field         | Type          | Null | Key  | Default | Extra |
+---------------+---------------+------+------+---------+-------+
| tinyint_col   | tinyint       | Yes  | true | NULL    |       |
| smallint_col  | smallint      | Yes  | true | NULL    |       |
| int_col       | int           | Yes  | true | NULL    |       |
| bigint_col    | bigint        | Yes  | true | NULL    |       |
| float_col     | float         | Yes  | true | NULL    |       |
| double_col    | double        | Yes  | true | NULL    |       |
| decimal_col   | decimal(10,2) | Yes  | true | NULL    |       |
| numeric_col   | decimal(10,2) | Yes  | true | NULL    |       |
| char_col      | text          | Yes  | true | NULL    |       |
| varchar_col   | text          | Yes  | true | NULL    |       |
| text_col      | text          | Yes  | true | NULL    |       |
| date_col      | date          | Yes  | true | NULL    |       |
| datetime_col  | datetime      | Yes  | true | NULL    |       |
| time_col      | text          | Yes  | true | NULL    |       |
| timestamp_col | datetime      | No   | true | NULL    |       |
+---------------+---------------+------+------+---------+-------+
15 rows in set (0.08 sec)

Doris > select * from gbase.doris_test.gbase_test;
+-------------+--------------+---------+------------+-----------+------------+-------------+-------------+----------------------------------------------------+---------------+--------------------+------------+---------------------+----------+---------------------+
| tinyint_col | smallint_col | int_col | bigint_col | float_col | double_col | decimal_col | numeric_col | char_col                                           | varchar_col   | text_col           | date_col   | datetime_col        | time_col | timestamp_col       |
+-------------+--------------+---------+------------+-----------+------------+-------------+-------------+----------------------------------------------------+---------------+--------------------+------------+---------------------+----------+---------------------+
|           1 |           18 |     100 |     500000 |      1.75 |       70.5 |    12345.67 |      100.00 | John Doe                                           | A description | Detailed text data | 2023-09-19 | 2023-09-19 12:34:56 | 12:00:00 | 2023-09-19 14:45:00 |
|        NULL |         NULL |    NULL |       NULL |      NULL |       NULL |        NULL |        NULL | NULL                                               | NULL          | NULL               | NULL       | NULL                | NULL     | 2024-09-19 23:17:06 |
+-------------+--------------+---------+------------+-----------+------------+-------------+-------------+----------------------------------------------------+---------------+--------------------+------------+---------------------+----------+---------------------+
2 rows in set (0.34 sec)
```

### Unsupported Type

- BLOB
- LONGBLOB
@morningman
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

…imit pushdown (apache#41587)

followup apache#41027
We should map time to String and support reading time outside of 24
hours.
and add limit pushdown
@morningman morningman changed the title [feature](jdbc catalog) support gbase jdbc catalog #41027 [feature](jdbc catalog) support gbase jdbc catalog #41027 #41587 Oct 19, 2024
@morningman
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@morningman morningman merged commit bbd4970 into apache:branch-2.1 Oct 21, 2024
20 of 22 checks passed
morningman added a commit to morningman/doris that referenced this pull request Oct 21, 2024
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.

3 participants