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

[SPARK-13400] Stop using deprecated Octal escape literals #11584

Closed
wants to merge 1 commit into from
Closed

[SPARK-13400] Stop using deprecated Octal escape literals #11584

wants to merge 1 commit into from

Conversation

dongjoon-hyun
Copy link
Member

What changes were proposed in this pull request?

This removes the remaining deprecated Octal escape literals. The followings are the warnings on those two lines.

LiteralExpressionSuite.scala:99: Octal escape literals are deprecated, use \u0000 instead.
HiveQlSuite.scala:74: Octal escape literals are deprecated, use \u002c instead.

How was this patch tested?

Manual.
During building, there should be no warning on Octal escape literals.

mvn -DskipTests clean install

@@ -71,7 +71,7 @@ class HiveQlSuite extends SparkFunSuite with BeforeAndAfterAll {
CatalogColumn("dt", "string", comment = Some("date type")) ::
CatalogColumn("hour", "string", comment = Some("hour of the day")) :: Nil)
assert(desc.storage.serdeProperties ==
Map((serdeConstants.SERIALIZATION_FORMAT, "\054"), (serdeConstants.FIELD_DELIM, "\054")))
Map((serdeConstants.SERIALIZATION_FORMAT, "\u002C"), (serdeConstants.FIELD_DELIM, "\u002C")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe i'm not understanding this correctly, but isn't 2C = 44?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So "\u002C" == "\054" returns true, and 054 is in octal which is 44 in decimal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok - thanks.

@rxin
Copy link
Contributor

rxin commented Mar 8, 2016

LGTM pending tests.

@holdenk
Copy link
Contributor

holdenk commented Mar 8, 2016

LGTM pending tests, we should of course do a quick search in the resulting build log and make sure no octal warnings show up but these are the two I had seen when building locally.

@dongjoon-hyun
Copy link
Member Author

Yes. We should do double check Jenkins log although I've seen those two lines in my local machine, too.
Thank you, @rxin and @holdenk .

@holdenk
Copy link
Contributor

holdenk commented Mar 8, 2016

Looking at the build logs no Octal deprecation warnings - (still waiting on the tests to finish but build part finished) :)

@dongjoon-hyun
Copy link
Member Author

Thank you for confirming that, @holdenk ! :)

@SparkQA
Copy link

SparkQA commented Mar 8, 2016

Test build #52685 has finished for PR 11584 at commit f7fd01a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

At last, it passed and there is no Octal warning.
Thank you all.

@rxin
Copy link
Contributor

rxin commented Mar 8, 2016

Thanks - merging in master.

@asfgit asfgit closed this in 076009b Mar 8, 2016
roygao94 pushed a commit to roygao94/spark that referenced this pull request Mar 22, 2016
## What changes were proposed in this pull request?

This removes the remaining deprecated Octal escape literals. The followings are the warnings on those two lines.
```
LiteralExpressionSuite.scala:99: Octal escape literals are deprecated, use \u0000 instead.
HiveQlSuite.scala:74: Octal escape literals are deprecated, use \u002c instead.
```

## How was this patch tested?

Manual.
During building, there should be no warning on `Octal escape literals`.
```
mvn -DskipTests clean install
```

Author: Dongjoon Hyun <dongjoon@apache.org>

Closes apache#11584 from dongjoon-hyun/SPARK-13400.
@dongjoon-hyun dongjoon-hyun deleted the SPARK-13400 branch March 29, 2016 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants