kettle
kettle copied to clipboard
Cannot call NULL or NOT_NULL
These two conditions for filtering should not have any extra attributes sent with them. The build conditions can be changed to check for condition2 being present - this allows us to call as follows:
->filter('column', 'NULL', false)
public function _buildConditions($conditions)
{
$result = array();
foreach ($conditions as $i => $condition) {
$key = $condition[0];
$operator = $condition[1];
$attributes = array();
if ($condition[2] !== false) {
$value = $condition[2];
if (!is_array($value)) {
$value = array((string) $value);
}
foreach ($value as $v) {
$attributes[] = array($this->_getDataType($key) => (string) $v);
}
}
$result[$key] = array(
'ComparisonOperator' => $operator,
'AttributeValueList' => $attributes,
);
}
return $result;
}
Hi rsands2801
I confirmed the bug.
Thank you for your sample code. I consider how to fix.
Thanks.
No problem @inouet
One other problem you may be interested in: you cannot build up multiple filters with the same column name. It only allows users to filter the same field name once
Is it possible to use multiple filters on same attribute?
https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-dynamodb-2012-08-10.html#scan
On this document, argument ScanFilter is an associative array with the keys of "AttributeName". so, I think that we can't be specify multiple AttributeName.
Thanks