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
Which version of common_schema are you using? (specify
revision+distribution)
common_schema-2.2.sql
Which component is failing? (specify the view, function, etc.)
view _sql_range_partitions_summary
What is the expected output? What do you see instead?
I have partitions set up by range using the id field.
I manually create partitions by range of 2000,4000,6000
I call the common_schema function sql_add_next_partition. It adds a new
partition of range less than 8000
I call it again, it adds a partition of range less than 10,000
I call it again, it complains of a duplicated range.
I've narrowed it down to this code in the view noted above:
MAX(IF(PARTITION_DESCRIPTION != 'MAXVALUE',
IFNULL(_as_datetime(unquote(PARTITION_DESCRIPTION)), CAST(PARTITION_DESCRIPTION AS SIGNED)),
NULL)
_as_datetime seems to have problems with the value 10000, so the result of the
query is 8000. The diff is added to this value to get the next partition name
of p_10000 which already exists.
The code does not seem to manage datetimes and integral values it seems.
Original issue reported on code.google.com by [email protected] on 27 Apr 2015 at 7:39
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 27 Apr 2015 at 7:39The text was updated successfully, but these errors were encountered: