-
Notifications
You must be signed in to change notification settings - Fork 67
Error when using copy in partitions #87
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
Comments
Can you provide information about table structure (from |
I cloned codes from master about a week ago and i also tried to set GEMPILE_DATA=# \d+ gem_s1u_http_kpi_1h_statistics; |
Here is a simple test case to recreate this issue. I created a csv file with only 1 timestamp value. Firstly I copy to a table WITHOUTH partitioning, result is good:
But it goes wrong when copy to a table partitioned with field created_time.
Also I tried input differnt timestamp format in the csv file, all result in the same error message above.
|
Hi, you have created partitions by |
I tried to reproduce your case. In my case all ok:
from psql:
I suspect it can be related with dropped columns. Can you provide result of this query:
|
Here is the result and thank you for your response; GEMPILE_DATA=# select * from pg_attribute where attrelid = 'gem_s1u_http_kpi_1h_statistics'::regclass; |
Thank you for your report. There was an actual bug, I pushed a fix to 'master' branch. |
1.Right now ,we recreate this table and it inserts datas successfully but we don't know why. 2.We also find another problem : After inserting datas ,hadoop will return a status of I'll be glad to hear from you! |
|
@SunjinPeng2017 About |
Hello,
sql:
1.create partitions
select create_range_partitions('gem_s1u_http_kpi_1h_statistics'::regclass,'statistical_time','2017-02-08 00:00:00'::timestamp,interval '1 hour',96,false );
2. set_enable_parent
select set_enable_parent('gem_s1u_http_kpi_1h_statistics'::regclass,false);
3.set_auto
select set_auto('gem_s1u_http_kpi_1h_statistics'::regclass,false);
4.now,when i use copy to insert datas,it lists:
ERROR: attribute(statistical_time) 11 has wrong type. details:Table has type character varying, but query expects timestamp without time zone. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)...
5.if i drop all patitions ,it works well.
What i should do to solve this problem?
The text was updated successfully, but these errors were encountered: