The HadoopTables#create doesn't check whether the spec is null which may lead to NullPointerExeception. For example, a user may use specForTables to get partition spec for a table and then pass it to HadoopTables#create, it throws NullPointerExeception if the table doesn't have partition column.
IIUC we should support creating the table which has no partition. So what is the default behavior? Shall we use a PartitionSpec with an empty PartitionField list?
PartitionSpec.buildfor(shema).build()
The
HadoopTables#createdoesn't check whether the spec is null which may lead to NullPointerExeception. For example, a user may usespecForTablesto get partition spec for a table and then pass it toHadoopTables#create, it throws NullPointerExeception if the table doesn't have partition column.IIUC we should support creating the table which has no partition. So what is the default behavior? Shall we use a PartitionSpec with an empty PartitionField list?
PartitionSpec.buildfor(shema).build()