Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database 如何确认记录';s值是否适合dolphindb中的分区方案?_Database_Date_Types_Partition_Dolphindb - Fatal编程技术网

Database 如何确认记录';s值是否适合dolphindb中的分区方案?

Database 如何确认记录';s值是否适合dolphindb中的分区方案?,database,date,types,partition,dolphindb,Database,Date,Types,Partition,Dolphindb,我创建一个分区表。例如: n=1000000 month=take(2000.01M..2016.12M, n) x=rand(1.0, n) t=table(month, x) db=database("dfs://valuedb", VALUE, 2000.01M..2016.12M) pt = db.createPartitionedTable(t, `pt, `month) 因此,记录栏的“月”应介于2000.01 m到2016.12 m.11之间。但我发现我也可以在dolphindb

我创建一个分区表。例如:

n=1000000
month=take(2000.01M..2016.12M, n)
x=rand(1.0, n)
t=table(month, x)
db=database("dfs://valuedb", VALUE, 2000.01M..2016.12M)
pt = db.createPartitionedTable(t, `pt, `month)
因此,记录栏的“月”应介于2000.01 m到2016.12 m.11之间。但我发现我也可以在dolphindb中插入值为'month'的记录,类型为DATE(而不是month):

t1 = table(2010.01.15 as month , 10 as x)
pt.append!(t1)

那么,如何确认记录的值是否符合分区方案呢?

当数据库分区方案中分区列的数据类型与表中对应列的数据类型不同时,DolphinDB会尽量执行隐式转换。在您的示例中,日期类型将转换为月份类型