Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
90f92420
Commit
90f92420
authored
13 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Patches
Plain Diff
Another fix ported forward for the REPL
parent
3854d23d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
repl/src/main/scala/spark/repl/SparkIMain.scala
+1
-1
1 addition, 1 deletion
repl/src/main/scala/spark/repl/SparkIMain.scala
repl/src/main/scala/spark/repl/SparkImports.scala
+7
-1
7 additions, 1 deletion
repl/src/main/scala/spark/repl/SparkImports.scala
with
8 additions
and
2 deletions
repl/src/main/scala/spark/repl/SparkIMain.scala
+
1
−
1
View file @
90f92420
...
@@ -1087,7 +1087,7 @@ object SparkIMain {
...
@@ -1087,7 +1087,7 @@ object SparkIMain {
// $line3.$read.$iw.$iw.Bippy =
// $line3.$read.$iw.$iw.Bippy =
// $line3.$read$$iw$$iw$Bippy@4a6a00ca
// $line3.$read$$iw$$iw$Bippy@4a6a00ca
private
def
removeLineWrapper
(
s
:
String
)
=
s
.
replaceAll
(
"""\$line\d+[./]\$(read|eval|print)[$.]"""
,
""
)
private
def
removeLineWrapper
(
s
:
String
)
=
s
.
replaceAll
(
"""\$line\d+[./]\$(read|eval|print)[$.]"""
,
""
)
private
def
removeIWPackages
(
s
:
String
)
=
s
.
replaceAll
(
"""\$(iw|read|eval|print)[$.]"""
,
""
)
private
def
removeIWPackages
(
s
:
String
)
=
s
.
replaceAll
(
"""\$(iw|
iwC|
read|eval|print)[$.]"""
,
""
)
private
def
removeSparkVals
(
s
:
String
)
=
s
.
replaceAll
(
"""\$VAL[0-9]+[$.]"""
,
""
)
private
def
removeSparkVals
(
s
:
String
)
=
s
.
replaceAll
(
"""\$VAL[0-9]+[$.]"""
,
""
)
def
stripString
(
s
:
String
)
=
removeSparkVals
(
removeIWPackages
(
removeLineWrapper
(
s
)))
def
stripString
(
s
:
String
)
=
removeSparkVals
(
removeIWPackages
(
removeLineWrapper
(
s
)))
...
...
This diff is collapsed.
Click to expand it.
repl/src/main/scala/spark/repl/SparkImports.scala
+
7
−
1
View file @
90f92420
...
@@ -175,7 +175,13 @@ trait SparkImports {
...
@@ -175,7 +175,13 @@ trait SparkImports {
// handle quoting keywords separately.
// handle quoting keywords separately.
case
x
=>
case
x
=>
for
(
imv
<-
x
.
definedNames
)
{
for
(
imv
<-
x
.
definedNames
)
{
if
(
currentImps
contains
imv
)
addWrapper
()
// MATEI: Changed this check because it was messing up for case classes
// (trying to import them twice within the same wrapper), but that is more likely
// due to a miscomputation of names that makes the code think they're unique.
// Need to evaluate whether having so many wrappers is a bad thing.
/*if (currentImps contains imv)*/
val
imvName
=
imv
.
toString
if
(
currentImps
exists
(
_
.
toString
==
imvName
))
addWrapper
()
val
objName
=
req
.
lineRep
.
readPath
val
objName
=
req
.
lineRep
.
readPath
val
valName
=
"$VAL"
+
newValId
();
val
valName
=
"$VAL"
+
newValId
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment