forward3d/rbhive

View on GitHub

Showing 349 of 414 total issues

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  class Get_index_names_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O2 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 8 other locations - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1806..1821
lib/thrift/thrift_hive_metastore.rb on lines 1839..1854
lib/thrift/thrift_hive_metastore.rb on lines 2211..2226
lib/thrift/thrift_hive_metastore.rb on lines 2245..2260
lib/thrift/thrift_hive_metastore.rb on lines 2773..2788
lib/thrift/thrift_hive_metastore.rb on lines 2899..2914
lib/thrift/thrift_hive_metastore.rb on lines 3049..3064
lib/thrift/thrift_hive_metastore.rb on lines 3424..3439

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  class Get_partition_names_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O2 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 8 other locations - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1806..1821
lib/thrift/thrift_hive_metastore.rb on lines 1839..1854
lib/thrift/thrift_hive_metastore.rb on lines 2211..2226
lib/thrift/thrift_hive_metastore.rb on lines 2245..2260
lib/thrift/thrift_hive_metastore.rb on lines 2899..2914
lib/thrift/thrift_hive_metastore.rb on lines 3049..3064
lib/thrift/thrift_hive_metastore.rb on lines 3323..3338
lib/thrift/thrift_hive_metastore.rb on lines 3424..3439

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  class Get_partition_names_ps_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 8 other locations - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1806..1821
lib/thrift/thrift_hive_metastore.rb on lines 1839..1854
lib/thrift/thrift_hive_metastore.rb on lines 2211..2226
lib/thrift/thrift_hive_metastore.rb on lines 2245..2260
lib/thrift/thrift_hive_metastore.rb on lines 2773..2788
lib/thrift/thrift_hive_metastore.rb on lines 3049..3064
lib/thrift/thrift_hive_metastore.rb on lines 3323..3338
lib/thrift/thrift_hive_metastore.rb on lines 3424..3439

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      class GetClusterStatus_result
        include ::Thrift::Struct, ::Thrift::Struct_Union
        SUCCESS = 0
        EX = 1

Severity: Minor
Found in lib/thrift/thrift_hive.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive.rb on lines 487..502

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  class Get_tables_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 8 other locations - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1806..1821
lib/thrift/thrift_hive_metastore.rb on lines 1839..1854
lib/thrift/thrift_hive_metastore.rb on lines 2245..2260
lib/thrift/thrift_hive_metastore.rb on lines 2773..2788
lib/thrift/thrift_hive_metastore.rb on lines 2899..2914
lib/thrift/thrift_hive_metastore.rb on lines 3049..3064
lib/thrift/thrift_hive_metastore.rb on lines 3323..3338
lib/thrift/thrift_hive_metastore.rb on lines 3424..3439

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  class Get_databases_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 8 other locations - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1839..1854
lib/thrift/thrift_hive_metastore.rb on lines 2211..2226
lib/thrift/thrift_hive_metastore.rb on lines 2245..2260
lib/thrift/thrift_hive_metastore.rb on lines 2773..2788
lib/thrift/thrift_hive_metastore.rb on lines 2899..2914
lib/thrift/thrift_hive_metastore.rb on lines 3049..3064
lib/thrift/thrift_hive_metastore.rb on lines 3323..3338
lib/thrift/thrift_hive_metastore.rb on lines 3424..3439

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  class Get_all_databases_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 8 other locations - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1806..1821
lib/thrift/thrift_hive_metastore.rb on lines 2211..2226
lib/thrift/thrift_hive_metastore.rb on lines 2245..2260
lib/thrift/thrift_hive_metastore.rb on lines 2773..2788
lib/thrift/thrift_hive_metastore.rb on lines 2899..2914
lib/thrift/thrift_hive_metastore.rb on lines 3049..3064
lib/thrift/thrift_hive_metastore.rb on lines 3323..3338
lib/thrift/thrift_hive_metastore.rb on lines 3424..3439

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 9 locations. Consider refactoring.
Open

  class Partition_name_to_vals_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 8 other locations - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1806..1821
lib/thrift/thrift_hive_metastore.rb on lines 1839..1854
lib/thrift/thrift_hive_metastore.rb on lines 2211..2226
lib/thrift/thrift_hive_metastore.rb on lines 2245..2260
lib/thrift/thrift_hive_metastore.rb on lines 2773..2788
lib/thrift/thrift_hive_metastore.rb on lines 2899..2914
lib/thrift/thrift_hive_metastore.rb on lines 3323..3338
lib/thrift/thrift_hive_metastore.rb on lines 3424..3439

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      class GetQueryPlan_result
        include ::Thrift::Struct, ::Thrift::Struct_Union
        SUCCESS = 0
        EX = 1

Severity: Minor
Found in lib/thrift/thrift_hive.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive.rb on lines 454..469

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def process_add_partition(seqid, iprot, oprot)
      args = read_args(iprot, Add_partition_args)
      result = Add_partition_result.new()
      begin
        result.success = @handler.add_partition(args.new_part)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1056..1068

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def process_get_partition_with_auth(seqid, iprot, oprot)
      args = read_args(iprot, Get_partition_with_auth_args)
      result = Get_partition_with_auth_result.new()
      begin
        result.success = @handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1326..1336

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def process_create_type(seqid, iprot, oprot)
      args = read_args(iprot, Create_type_args)
      result = Create_type_result.new()
      begin
        result.success = @handler.create_type(args.type)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1203..1215

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def process_get_partitions_with_auth(seqid, iprot, oprot)
      args = read_args(iprot, Get_partitions_with_auth_args)
      result = Get_partitions_with_auth_result.new()
      begin
        result.success = @handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1287..1297

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      class GetThriftSchema_result
        include ::Thrift::Struct, ::Thrift::Struct_Union
        SUCCESS = 0
        EX = 1

Severity: Minor
Found in lib/thrift/thrift_hive.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive.rb on lines 388..403

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    def coerce_column(column_name, value)
      type = column_type_map[column_name]
      return INFINITY if (type != :string && value == "Infinity")
      return NAN if (type != :string && value == "NaN")
      return coerce_complex_value(value) if type.to_s =~ /^array/
Severity: Minor
Found in lib/rbhive/t_c_l_i_schema_definition.rb and 1 other location - About 55 mins to fix
lib/rbhive/schema_definition.rb on lines 66..73

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      class GetSchema_result
        include ::Thrift::Struct, ::Thrift::Struct_Union
        SUCCESS = 0
        EX = 1

Severity: Minor
Found in lib/thrift/thrift_hive.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive.rb on lines 421..436

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    def coerce_column(column_name, value)
      type = column_type_map[column_name]
      return INFINITY if (type != :string && value == "Infinity")
      return NAN if (type != :string && value == "NaN")
      return coerce_complex_value(value) if type.to_s =~ /^array/
Severity: Minor
Found in lib/rbhive/schema_definition.rb and 1 other location - About 55 mins to fix
lib/rbhive/t_c_l_i_schema_definition.rb on lines 67..74

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 44.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    def process_drop_partition_by_name(seqid, iprot, oprot)
      args = read_args(iprot, Drop_partition_by_name_args)
      result = Drop_partition_by_name_result.new()
      begin
        result.success = @handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1248..1258
lib/thrift/thrift_hive_metastore.rb on lines 1385..1395
lib/thrift/thrift_hive_metastore.rb on lines 1472..1482

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 43.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    def process_get_partitions_by_filter(seqid, iprot, oprot)
      args = read_args(iprot, Get_partitions_by_filter_args)
      result = Get_partitions_by_filter_result.new()
      begin
        result.success = @handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1248..1258
lib/thrift/thrift_hive_metastore.rb on lines 1261..1271
lib/thrift/thrift_hive_metastore.rb on lines 1472..1482

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 43.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    def process_drop_index_by_name(seqid, iprot, oprot)
      args = read_args(iprot, Drop_index_by_name_args)
      result = Drop_index_by_name_result.new()
      begin
        result.success = @handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1248..1258
lib/thrift/thrift_hive_metastore.rb on lines 1261..1271
lib/thrift/thrift_hive_metastore.rb on lines 1385..1395

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 43.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language