tuhaihe commented on code in PR #1837:
URL: https://github.com/apache/cloudberry/pull/1837#discussion_r3510842949
##########
src/test/singlenode_regress/sql/AOCO_Compression.sql:
##########
@@ -1747,8 +1747,25 @@ get_ao_compression_ratio('mpp17012_compress_test2');
-- When I insert data
insert into mpp17012_compress_test2
values('a',generate_series(1,250),'ksjdhfksdhfksdhfksjhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh','bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
-- Then the data will be compressed according to a consistent compression ratio
+-- start_ignore
select pg_size_pretty(pg_relation_size('mpp17012_compress_test2')),
get_ao_compression_ratio('mpp17012_compress_test2');
+-- end_ignore
+select
+ case
+ when
+ abs((pg_relation_size('mpp17012_compress_test2') - 712.0) / 712.0)
< 0.1
+ then 'test passed'
+ else 'test failed'
+ end as test_relation_size;
+
+select
+ case
+ when
+ abs((get_ao_compression_ratio('mpp17012_compress_test2') - 36.75)
/ 36.75) < 0.1
+ then 'test passed'
+ else 'test failed'
+ end as test_ao_compression_ratio;
Review Comment:
This change needs further review to ensure it's correct.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]