<commit_before>syntax = "proto3";

package substrait;

import "substrait/type.proto";

option java_multiple_files = true;
option java_package = "io.substrait.proto";
option csharp_namespace = "Substrait.Protobuf";

message Expression {
  oneof rex_type {
    Literal literal = 1;
    FieldReference selection = 2;
    ScalarFunction scalar_function = 3;
    WindowFunction window_function = 5;
    IfThen if_then = 6;
    SwitchExpression switch_expression = 7;
    SingularOrList singular_or_list = 8;
    MultiOrList multi_or_list = 9;
    Enum enum = 10;
    Cast cast = 11;
  }

  message Enum {
    oneof enum_kind {
      string specified = 1;
      Empty unspecified = 2;
    }

    message Empty {}
  }

  message Literal {
    oneof literal_type {
      bool boolean = 1;
      int32 i8 = 2;
      int32 i16 = 3;
      int32 i32 = 5;
      int64 i64 = 7;
      float fp32 = 10;
      double fp64 = 11;
      string string = 12;
      bytes binary = 13;
      // Timestamp in units of microseconds since the UNIX epoch.
      int64 timestamp = 14;
      // Date in units of microseconds since the UNIX epoch.
      int64 date = 16;
      // Time in units of microseconds past midnight
      int64 time = 17;
      IntervalYearToMonth interval_year_to_month = 19;
      IntervalDayToSecond interval_day_to_second = 20;
      string fixed_char = 21;
      VarChar var_char = 22;
      bytes fixed_binary = 23;
      Decimal decimal = 24;
      Struct struct = 25;
      Map map = 26;
      // Timestamp in units of microseconds since the UNIX epoch.
      int64 timestamp_tz = 27;
      bytes uuid = 28;
      Type null = 29; // a typed null literal
      List list = 30;
    }

    // whether the literal type should be treated as a nullable type. Applies to
    // all members of union other than the Typed null (which should directly
    // declare nullability).
    bool nullable = 50;

    message VarChar {
      string value = 1;
      uint32 length = 2;
    }

    message Decimal {
      // little-endian twos-complement integer representation of complete value
      // (ignoring precision) Always 16 bytes in length
      bytes value = 1;
      // The maximum number of digits allowed in the value.
      // the maximum precision is 38.
      int32 precision = 2;
      // declared scale of decimal literal
      int32 scale = 3;
    }

    message Map {
      message KeyValue {
        Literal key = 1;
        Literal value = 2;
      }

      repeated KeyValue key_values = 1;
      // The key type of the map literal
      //
      // Required if `key_values` is empty
      Type key_type = 2;
      // The value type of the map literal
      //
      // Required if `key_values` is empty
      Type value_type = 3;
    }

    message IntervalYearToMonth {
      int32 years = 1;
      int32 months = 2;
    }

    message IntervalDayToSecond {
      int32 days = 1;
      int32 seconds = 2;
    }

    message Struct {
      // A possibly heterogeneously typed list of literals
      repeated Literal fields = 1;
    }

    message List {
      // A homogeneously typed list of literals
      repeated Literal values = 1;
      // The element type of the list literal.
      //
      // Required if `values` is empty.
      Type element_type = 2;
    }<commit_msg>refactor: change field name for List value type (#104)<commit_after>syntax = "proto3";

package substrait;

import "substrait/type.proto";

option java_multiple_files = true;
option java_package = "io.substrait.proto";
option csharp_namespace = "Substrait.Protobuf";

message Expression {
  oneof rex_type {
    Literal literal = 1;
    FieldReference selection = 2;
    ScalarFunction scalar_function = 3;
    WindowFunction window_function = 5;
    IfThen if_then = 6;
    SwitchExpression switch_expression = 7;
    SingularOrList singular_or_list = 8;
    MultiOrList multi_or_list = 9;
    Enum enum = 10;
    Cast cast = 11;
  }

  message Enum {
    oneof enum_kind {
      string specified = 1;
      Empty unspecified = 2;
    }

    message Empty {}
  }

  message Literal {
    oneof literal_type {
      bool boolean = 1;
      int32 i8 = 2;
      int32 i16 = 3;
      int32 i32 = 5;
      int64 i64 = 7;
      float fp32 = 10;
      double fp64 = 11;
      string string = 12;
      bytes binary = 13;
      // Timestamp in units of microseconds since the UNIX epoch.
      int64 timestamp = 14;
      // Date in units of microseconds since the UNIX epoch.
      int64 date = 16;
      // Time in units of microseconds past midnight
      int64 time = 17;
      IntervalYearToMonth interval_year_to_month = 19;
      IntervalDayToSecond interval_day_to_second = 20;
      string fixed_char = 21;
      VarChar var_char = 22;
      bytes fixed_binary = 23;
      Decimal decimal = 24;
      Struct struct = 25;
      Map map = 26;
      // Timestamp in units of microseconds since the UNIX epoch.
      int64 timestamp_tz = 27;
      bytes uuid = 28;
      Type null = 29; // a typed null literal
      List list = 30;
    }

    // whether the literal type should be treated as a nullable type. Applies to
    // all members of union other than the Typed null (which should directly
    // declare nullability).
    bool nullable = 50;

    message VarChar {
      string value = 1;
      uint32 length = 2;
    }

    message Decimal {
      // little-endian twos-complement integer representation of complete value
      // (ignoring precision) Always 16 bytes in length
      bytes value = 1;
      // The maximum number of digits allowed in the value.
      // the maximum precision is 38.
      int32 precision = 2;
      // declared scale of decimal literal
      int32 scale = 3;
    }

    message Map {
      message KeyValue {
        Literal key = 1;
        Literal value = 2;
      }

      repeated KeyValue key_values = 1;
      // The key type of the map literal
      //
      // Required if `key_values` is empty
      Type key_type = 2;
      // The value type of the map literal
      //
      // Required if `key_values` is empty
      Type value_type = 3;
    }

    message IntervalYearToMonth {
      int32 years = 1;
      int32 months = 2;
    }

    message IntervalDayToSecond {
      int32 days = 1;
      int32 seconds = 2;
    }

    message Struct {
      // A possibly heterogeneously typed list of literals
      repeated Literal fields = 1;
    }

    message List {
      // A homogeneously typed list of literals
      repeated Literal values = 1;
      // The element type of the list literal.
      //
      // Required if `values` is empty.
      Type value_type = 2;
    }
{'fraction_non_alphanumeric': 0.07046726145471043, 'fraction_numerical': 0.0373506729169817, 'mean_word_length': 2.0465223399355135, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5194747', 'n_tokens_mistral': 2148, 'n_tokens_neox': 1898, 'n_words': 722}