Open xxhZs opened 4 months ago
Which version are you using? I can get the array internal type from information_schema.columns using doris 2.0
2. row TABLE_SCHEMA: test TABLE_NAME: array_test1 COLUMN_NAME: c_array DATA_TYPE: array COLUMN_TYPE: array<decimalv3(10, 1)>
Which version are you using? I can get the array internal type from information_schema.columns using doris 2.0
2. row TABLE_SCHEMA: test TABLE_NAME: array_test1 COLUMN_NAME: c_array DATA_TYPE: array COLUMN_TYPE: array<decimalv3(10, 1)>
I use apache/doris:2.0.0_alpha-fe-x86_64, and I do it select * from information_schema.columns where table_name = 'demo_bhv_table'; +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT | COLUMN_SIZE | DECIMAL_DIGITS | GENERATION_EXPRESSION | SRS_ID | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | internal | demo | demo_bhv_table | user_id | 1 | NULL | YES | int | NULL | NULL | 10 | 0 | NULL | NULL | NULL | int(11) | UNI | | | | 10 | 0 | NULL | NULL | | internal | demo | demo_bhv_table | target_id | 2 | NULL | YES | varchar | 2147483643 | 8589934572 | NULL | NULL | NULL | NULL | NULL | string | | | | | 2147483643 | NULL | NULL | NULL | | internal | demo | demo_bhv_table | event_timestamp_local | 3 | NULL | YES | array | NULL | NULL | NULL | NULL | NULL | NULL | NULL | unknown | | | | | NULL | NULL | NULL | NULL | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ result is
Which version are you using? I can get the array internal type from information_schema.columns using doris 2.0 2. row TABLE_SCHEMA: test TABLE_NAME: array_test1 COLUMN_NAME: c_array DATA_TYPE: array COLUMN_TYPE: array<decimalv3(10, 1)>
I use apache/doris:2.0.0_alpha-fe-x86_64, and I do it select * from information_schema.columns where table_name = 'demo_bhv_table'; +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT | COLUMN_SIZE | DECIMAL_DIGITS | GENERATION_EXPRESSION | SRS_ID | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | internal | demo | demo_bhv_table | user_id | 1 | NULL | YES | int | NULL | NULL | 10 | 0 | NULL | NULL | NULL | int(11) | UNI | | | | 10 | 0 | NULL | NULL | | internal | demo | demo_bhv_table | target_id | 2 | NULL | YES | varchar | 2147483643 | 8589934572 | NULL | NULL | NULL | NULL | NULL | string | | | | | 2147483643 | NULL | NULL | NULL | | internal | demo | demo_bhv_table | event_timestamp_local | 3 | NULL | YES | array | NULL | NULL | NULL | NULL | NULL | NULL | NULL | unknown | | | | | NULL | NULL | NULL | NULL | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ result is
How to reproduce? Could you provide the create table statement
Which version are you using? I can get the array internal type from information_schema.columns using doris 2.0 2. row TABLE_SCHEMA: test TABLE_NAME: array_test1 COLUMN_NAME: c_array DATA_TYPE: array COLUMN_TYPE: array<decimalv3(10, 1)>
I use apache/doris:2.0.0_alpha-fe-x86_64, and I do it select * from information_schema.columns where table_name = 'demo_bhv_table'; +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT | COLUMN_SIZE | DECIMAL_DIGITS | GENERATION_EXPRESSION | SRS_ID | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | internal | demo | demo_bhv_table | user_id | 1 | NULL | YES | int | NULL | NULL | 10 | 0 | NULL | NULL | NULL | int(11) | UNI | | | | 10 | 0 | NULL | NULL | | internal | demo | demo_bhv_table | target_id | 2 | NULL | YES | varchar | 2147483643 | 8589934572 | NULL | NULL | NULL | NULL | NULL | string | | | | | 2147483643 | NULL | NULL | NULL | | internal | demo | demo_bhv_table | event_timestamp_local | 3 | NULL | YES | array | NULL | NULL | NULL | NULL | NULL | NULL | NULL | unknown | | | | | NULL | NULL | NULL | NULL | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ result is
How to reproduce? Could you provide the create table statement
sure
CREATE database demo;
use demo;
CREATE table demo_bhv_table(
user_id int,
target_id text,
event_timestamp_local datetime
) UNIQUE KEY(user_id
)
DISTRIBUTED BY HASH(user_id
) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
But the event_timestamp_local column is datetime type instead of array type in my environment.
mysql> select * from information_schema.columns where table_name like 'demo_bhv_table'; +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT | COLUMN_SIZE | DECIMAL_DIGITS | GENERATION_EXPRESSION | SRS_ID | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | internal | demo | demo_bhv_table | user_id | 1 | NULL | YES | int | NULL | NULL | 10 | 0 | NULL | NULL | NULL | int(11) | UNI | | | | 10 | 0 | NULL | NULL | | internal | demo | demo_bhv_table | target_id | 2 | NULL | YES | varchar | 2147483643 | 8589934572 | NULL | NULL | NULL | NULL | NULL | string | | | | | 2147483643 | NULL | NULL | NULL | | internal | demo | demo_bhv_table | event_timestamp_local | 3 | NULL | YES | datetime | NULL | NULL | 18 | 0 | NULL | NULL | NULL | datetime | | | | | NULL | 0 | NULL | NULL | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+
But the event_timestamp_local column is datetime type instead of array type in my environment.
mysql> select * from information_schema.columns where table_name like 'demo_bhv_table'; +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT | COLUMN_SIZE | DECIMAL_DIGITS | GENERATION_EXPRESSION | SRS_ID | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | internal | demo | demo_bhv_table | user_id | 1 | NULL | YES | int | NULL | NULL | 10 | 0 | NULL | NULL | NULL | int(11) | UNI | | | | 10 | 0 | NULL | NULL | | internal | demo | demo_bhv_table | target_id | 2 | NULL | YES | varchar | 2147483643 | 8589934572 | NULL | NULL | NULL | NULL | NULL | string | | | | | 2147483643 | NULL | NULL | NULL | | internal | demo | demo_bhv_table | event_timestamp_local | 3 | NULL | YES | datetime | NULL | NULL | 18 | 0 | NULL | NULL | NULL | datetime | | | | | NULL | 0 | NULL | NULL | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+-------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+
sorry,The real create stmt is
CREATE table demo_bhv_table( user_id int, target_id text, event_timestamp_local
array<int>
) UNIQUE KEY(user_id) DISTRIBUTED BY HASH(user_id) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1" );
Can not reproduce, It shows array<int(11)>: mysql> select * from information_schema.columns where table_name like 'demo_bhv_table'; +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+----------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | ORDINAL_POSITION | COLUMN_DEFAULT | IS_NULLABLE | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | CHARACTER_OCTET_LENGTH | NUMERIC_PRECISION | NUMERIC_SCALE | DATETIME_PRECISION | CHARACTER_SET_NAME | COLLATION_NAME | COLUMN_TYPE | COLUMN_KEY | EXTRA | PRIVILEGES | COLUMN_COMMENT | COLUMN_SIZE | DECIMAL_DIGITS | GENERATION_EXPRESSION | SRS_ID | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+----------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+ | internal | demo | demo_bhv_table | user_id | 1 | NULL | YES | int | NULL | NULL | 10 | 0 | NULL | NULL | NULL | int(11) | UNI | | | | 10 | 0 | NULL | NULL | | internal | demo | demo_bhv_table | target_id | 2 | NULL | YES | varchar | 2147483643 | 8589934572 | NULL | NULL | NULL | NULL | NULL | string | | | | | 2147483643 | NULL | NULL | NULL | | internal | demo | demo_bhv_table | event_timestamp_local | 3 | NULL | YES | array | NULL | NULL | NULL | NULL | NULL | NULL | NULL | array<int(11)> | | | | | NULL | NULL | NULL | NULL | +---------------+--------------+----------------+-----------------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+----------------+------------+-------+------------+----------------+-------------+----------------+-----------------------+--------+
Search before asking
Version
x
What's Wrong?
I tried to get the type inside the array, but I can't get it, I queried it from the
columns
table and it came up withunknown
, I got it from the http api and it came up witharray
What You Expected?
I want the type of the doris to be
array<decimal(10,1)>
, and the type that I can get it to be isarray<decimal(10,1)>
, notunknown
orarray
I prefer to get it from the http port though, so I don't have to access two portsHow to Reproduce?
x
Anything Else?
x
Are you willing to submit PR?
Code of Conduct