Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scalastyle:on Locale.ROOT missing for some toLowerCase and throwerror => unable to build #83

Closed
obar1 opened this issue Jul 5, 2019 · 1 comment

Comments

@obar1
Copy link

obar1 commented Jul 5, 2019

1st test running
error on build ()

error] C:\Users\Mario_Amatucci\gitlab\delta\src\main\scala\org\apache\spark\sql\delta\schema\SchemaUtils.scala:157:44:
[error]       Are you sure that you want to use toUpperCase or toLowerCase without the root locale? In most cases, you
[error]       should use toUpperCase(Locale.ROOT) or toLowerCase(Locale.ROOT) instead.
[error]       If you must use toUpperCase or toLowerCase without the root locale, wrap the code block with
[error]       // scalastyle:off caselocale
[error]       .toUpperCase
[error]       .toLowerCase
[error]       // scalastyle:on caselocale

because

pathsWithPartitionValues.map(_._2.columnNames.map(_.toLowerCase()))

and other lines

@obar1
Copy link
Author

obar1 commented Jul 5, 2019

ans this works

  private def assertLogBelongsToTable(logBasePath: URI): UserDefinedFunction = {
    udf((filePath: String) => {
      if (filePath.isEmpty || new Path(new URI(filePath)).getParent == new Path(logBasePath)) {
        filePath // scalastyle:ignore throwerror
      } else {
        val msg = s"File ($filePath) doesn't belong in the " +
          s"transaction log at $logBasePath. Please contact Databricks Support."
        throw new AssertionError(msg) // scalastyle:ignore throwerror

      }
    })
  }

not the current one
where I get failure on the scalatest thorwerror

@obar1 obar1 changed the title Locale.ROOT missing for some toLowerCase scalastyle:on Locale.ROOT missing for some toLowerCase and throwerror => unable to build Jul 5, 2019
LantaoJin added a commit to LantaoJin/delta that referenced this issue Mar 12, 2021
tdas pushed a commit to tdas/delta that referenced this issue May 31, 2023
tdas pushed a commit to tdas/delta that referenced this issue May 31, 2023
* Adding sql-delta-import

* cleanup. resolving compilation and scala fmt issues

* changing copyright to Scribd

* adding link to README.md

* using scala 2_12 only for `sql-delta-import`

* Create AUTHORS.md (delta-io#83)

* Rename AUTHORS.md to AUTHORS

* Addressing PR feedback.
Adding Scribd to AUTHORS
Changing attribution to The Delta Lake Project Authors

* Update AUTHORS

* Addressing PR feedback

* fixing formatting

* fixing dependency resolution failures

* changing spark-sql dependency for cross scala versions

* adding test for sql-delta-import

* proper project name in CircleCI

* Just trying to restart circle CI build..

* only publishing sql-delta-import for scala 2.12

* adding aliases to lower/upper bounds columns in bounds query to better support data stores that require it

Co-authored-by: Alex Kushnir <alex.kushnir@scribd.com>
Co-authored-by: Denny Lee <denny.g.lee@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants