Beispiel #1
0
 def test_sized_decimal_from_description(self):
     col = SnowflakeColumn.from_description('my_col', 'DECIMAL(1, 0)')
     assert col.column == 'my_col'
     assert col.dtype == 'DECIMAL'
     assert col.char_size is None
     assert col.numeric_precision == 1
     assert col.numeric_scale == 0
     assert col.is_float() is False
     assert col.is_number() is True
     assert col.is_numeric() is True
     assert col.is_string() is False
     assert col.is_integer() is False
Beispiel #2
0
 def test_float_from_description(self):
     col = SnowflakeColumn.from_description('my_col', 'FLOAT8')
     assert col.column == 'my_col'
     assert col.dtype == 'FLOAT8'
     assert col.char_size is None
     assert col.numeric_precision is None
     assert col.numeric_scale is None
     assert col.is_float() is True
     assert col.is_number() is True
     assert col.is_numeric() is False
     assert col.is_string() is False
     assert col.is_integer() is False
Beispiel #3
0
 def test_sized_varchar_from_description(self):
     col = SnowflakeColumn.from_description('my_col', 'VARCHAR(256)')
     assert col.column == 'my_col'
     assert col.dtype == 'VARCHAR'
     assert col.char_size == 256
     assert col.numeric_precision is None
     assert col.numeric_scale is None
     assert col.is_float() is False
     assert col.is_number() is False
     assert col.is_numeric() is False
     assert col.is_string() is True
     assert col.is_integer() is False
     assert col.string_size() == 256