static long encodeFieldNameAsLong(String fieldName) {
    long fieldNameEncoded = 0;
    for (int i = 0; i < fieldName.length(); i++) {
      char c = fieldName.charAt(i);
      if (c >= '0' && c <= '9') {
        fieldNameEncoded = fieldNameEncoded << 6 | ((c - '0') & 0b00111111);
      } else if (c >= 'A' && c <= 'Z') {
        fieldNameEncoded = fieldNameEncoded << 6 | ((c - 'A' + 10) & 0b00111111);
      } else {
        Preconditions.checkArgument(c >= 'a' && c <= 'z', "%s should b in range a~z", c);
        fieldNameEncoded = fieldNameEncoded << 6 | ((c - 'a' + 10 + 26) & 0b00111111);
      }
    }
    return fieldNameEncoded;
  }
@Test
  public void testEncodeFieldNameAsLong() {
    Assert.assertEquals(decodeLongAsString(encodeFieldNameAsLong("123"), 18), "123");
    Assert.assertEquals(decodeLongAsString(encodeFieldNameAsLong("abc"), 18), "abc");
    Assert.assertEquals(decodeLongAsString(encodeFieldNameAsLong("ABC"), 18), "ABC");
    Assert.assertEquals(decodeLongAsString(encodeFieldNameAsLong("abcd145"), 42), "abcd145");
    Assert.assertEquals(decodeLongAsString(encodeFieldNameAsLong("Abcd145"), 42), "Abcd145");
    Assert.assertEquals(decodeLongAsString(encodeFieldNameAsLong("abcd12345"), 54), "abcd12345");
    Assert.assertEquals(decodeLongAsString(encodeFieldNameAsLong("aBcD12Z4z"), 54), "aBcD12Z4z");
  }