[Groonga-commit] ranguba/rroonga at b0e05ab [master] Add missing Zstandard support in dumper

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Mon Dec 12 23:29:10 JST 2016


Kouhei Sutou	2016-12-12 23:29:10 +0900 (Mon, 12 Dec 2016)

  New Revision: b0e05ab94ae7b05527dd86e43c99e72b60433b57
  https://github.com/ranguba/rroonga/commit/b0e05ab94ae7b05527dd86e43c99e72b60433b57

  Message:
    Add missing Zstandard support in dumper
    
    The following test is failed without this change:
    
        Failure: test_zstd(SchemaDumperTest::CommandSyntaxSchemaDumperTest::ColumnCompressionTest)
        /home/kou/work/ruby/rroonga/test/test-schema-dumper.rb:439:in `test_zstd'
             436:         define_column_compression_zstd_schema
             437:         flags = "COLUMN_SCALAR"
             438:         flags << "|COMPRESS_ZSTD" if context.support_zstd?
          => 439:         assert_equal(<<-SCHEMA, dump)
             440: table_create Posts TABLE_NO_KEY
             441: column_create Posts title #{flags} ShortText
             442:         SCHEMA
        <"table_create Posts TABLE_NO_KEY\ncolumn_create Posts title COLUMN_SCALAR|COMPRESS_ZSTD ShortText\n"> expected but was
        <"table_create Posts TABLE_NO_KEY\ncolumn_create Posts title COLUMN_SCALAR ShortText\n">
    
        diff:
          table_create Posts TABLE_NO_KEY
        ? column_create Posts title COLUMN_SCALAR|COMPRESS_ZSTD ShortText
                                                 --------------

  Modified files:
    lib/groonga/dumper.rb

  Modified: lib/groonga/dumper.rb (+2 -0)
===================================================================
--- lib/groonga/dumper.rb    2016-12-12 23:26:08 +0900 (cc29f64)
+++ lib/groonga/dumper.rb    2016-12-12 23:29:10 +0900 (0a377f4)
@@ -628,6 +628,8 @@ module Groonga
             flags << "COMPRESS_ZLIB"
           elsif column.compressed?(:lz4)
             flags << "COMPRESS_LZ4"
+          elsif column.compressed?(:zstd)
+            flags << "COMPRESS_ZSTD"
           end
         end
         parameters << "#{flags.join('|')}"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index