Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

bug: execute ignore type with null #68

Description

@TCeason

Create table:

./target/debug/bendsql                                                                                                                                                                                ✔  eason@databend-arch1 
Welcome to BendSQL 0.17.0-1f08d67(2024-04-25T02:50:17.575815250Z).
Connecting to localhost:8000 as user root.
Connected to Databend Query v1.2.329-nightly-2e3459707e(rust-1.77.0-nightly-2024-04-24T06:04:56.359605219Z)

:) select * from t;
tuple res is Tuple([Nullable(Number(Int32)), Nullable(Nullable(String))])

SELECT
  *
FROM
  t

┌──────────────────────────────────────────────────────────────┐
│                              id                              │
│ Nullable(Tuple(Nullable(Int32), Nullable(Nullable(String)))) │
├──────────────────────────────────────────────────────────────┤
│ NULL                                                         │
└──────────────────────────────────────────────────────────────┘
1 row read in 0.084 sec. Processed 1 row, 31B (11.89 rows/s, 368B/s)

:) show create table t;

SHOW CREATE TABLE t

┌─────────────────────────────────────────────────────────────────────────────────────┐
│  Table │                                Create Table                                │
│ String │                                   String                                   │
├────────┼────────────────────────────────────────────────────────────────────────────┤
│ t      │ CREATE TABLE t (\n  id TUPLE(1 INT32, 2 ARRAY(STRING)) NULL\n) ENGINE=FUSE │
└─────────────────────────────────────────────────────────────────────────────────────┘
1 row read in 0.073 sec. Processed 0 row, 0B (0 row/s, 0B/s)

:) 
Bye~

The type of id is : Nullable(Tuple(Nullable(Int32), Nullable(Nullable(String))))

But in databend-py type of id is :Tuple(Int32 NULL, Array(String NULL

ignore a ) quote and The type is not null.

cat ~/a.py                                                                                                                                                                                  ✔  2m 5s   eason@databend-arch1 
#!/usr/bin/env python3


from databend_py import Client

client = Client.from_url("http://root:root@localhost:8000")
ct, res = client.execute('select * from t', with_column_types=True)
print(ct)
print(res)
    /data/eason/bendsql    main ⇡227 !1  python3 ~/a.py                                                                                                                                                                                        ✔  eason@databend-arch1 
[('id', 'Tuple(Int32 NULL, Array(String NULL')]
[('NULL',)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions