You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge?
This is the simplest way to create a string column
statement ok
create table t(a varchar) as values ('1'), ('2');
query T
select arrow_typeof(a) from t;
----
Utf8
Utf8
statement ok
drop table t
I'm finding a simple way to create Utf8View column. We can achieve this with casting (See datafusion/sqllogictest/test_files/string/string_view.slt) but I think we can have a more simpler way to do this.
Describe the solution you'd like
I have two idea but not sure which one is better
Approach 1
Set the configuration with use_string_view = true, and we will read the column (varchar) as string view type instead of string type.
Something like
set datafusion.xxx.use_string_view = true
statement ok
create table t(a varchar) as values ('1'), ('2');
query T
select arrow_typeof(a) from t;
----
Utf8View
Utf8View
statement ok
drop table t
This avoid adding new syntax.
Approach 2
introduce string_view syntax like varchar_view so we know we want to read it as string view type
Something like
statement ok
create table t(a varchar_view) as values ('1'), ('2');
query T
select arrow_typeof(a) from t;
----
Utf8View
Utf8View
statement ok
drop table t
This adds complexity of understanding of string view type for people from Postgres.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
statement ok
create table t(a varchar) as values ('1'), ('2');
query T
select arrow_typeof(a) from t;
Utf8View
Utf8View
if the table t is created internally using Utf8View, then i agree that SLT should return that on query output.
if the table t is created internally using Utf8, SLT should continue to read it as Utf8, unless DF engine generally replaces Utf8View with Utf8 (which i think it does not)
Is your feature request related to a problem or challenge?
This is the simplest way to create a string column
I'm finding a simple way to create
Utf8View
column. We can achieve this with casting (Seedatafusion/sqllogictest/test_files/string/string_view.slt
) but I think we can have a more simpler way to do this.Describe the solution you'd like
I have two idea but not sure which one is better
Approach 1
Set the configuration with
use_string_view = true
, and we will read the column (varchar
) as string view type instead of string type.Something like
This avoid adding new syntax.
Approach 2
introduce string_view syntax like
varchar_view
so we know we want to read it as string view typeSomething like
This adds complexity of understanding of string view type for people from Postgres.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: